@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | $art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
32 | 32 | if (empty($art_id)) { |
33 | - redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID')); |
|
33 | + redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID')); |
|
34 | 34 | } |
35 | 35 | if (!$xoopsUser->isAdmin()) { |
36 | - redirect_header('javascript:history.go(-1);', 2, _NOPERM); |
|
36 | + redirect_header('javascript:history.go(-1);', 2, _NOPERM); |
|
37 | 37 | } |
38 | 38 | include XOOPS_ROOT_PATH . '/header.php'; |
39 | 39 | include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
@@ -44,58 +44,58 @@ discard block |
||
44 | 44 | $op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : ''; |
45 | 45 | |
46 | 46 | if ($op === 'del' || !empty(Request::getString('del', '', 'POST'))) { |
47 | - $articleHandler->delete($article_obj); |
|
48 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
49 | - $message = planet_constant('MD_SAVED'); |
|
50 | - redirect_header($redirect, 2, $message); |
|
47 | + $articleHandler->delete($article_obj); |
|
48 | + $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
49 | + $message = planet_constant('MD_SAVED'); |
|
50 | + redirect_header($redirect, 2, $message); |
|
51 | 51 | } elseif ($op === 'save') { |
52 | - if (empty($_POST['art_content'])) { |
|
53 | - redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_TEXTEMPTY')); |
|
54 | - } |
|
52 | + if (empty($_POST['art_content'])) { |
|
53 | + redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_TEXTEMPTY')); |
|
54 | + } |
|
55 | 55 | |
56 | - foreach (array( |
|
57 | - 'art_title', |
|
58 | - 'art_link', |
|
59 | - 'art_author', |
|
60 | - 'art_content' |
|
61 | - ) as $tag) { |
|
62 | - if (@Request::getString('tag', '', 'POST') != $article_obj->getVar($tag)) { |
|
63 | - $article_obj->setVar($tag, @Request::getString('tag', '', 'POST')); |
|
64 | - } |
|
65 | - } |
|
56 | + foreach (array( |
|
57 | + 'art_title', |
|
58 | + 'art_link', |
|
59 | + 'art_author', |
|
60 | + 'art_content' |
|
61 | + ) as $tag) { |
|
62 | + if (@Request::getString('tag', '', 'POST') != $article_obj->getVar($tag)) { |
|
63 | + $article_obj->setVar($tag, @Request::getString('tag', '', 'POST')); |
|
64 | + } |
|
65 | + } |
|
66 | 66 | |
67 | - $art_id_new = $articleHandler->insert($article_obj); |
|
68 | - if (!$article_obj->getVar('art_id')) { |
|
69 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
70 | - $message = planet_constant('MD_INSERTERROR'); |
|
71 | - } else { |
|
72 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
73 | - $message = planet_constant('MD_SAVED'); |
|
74 | - } |
|
75 | - redirect_header($redirect, 2, $message); |
|
67 | + $art_id_new = $articleHandler->insert($article_obj); |
|
68 | + if (!$article_obj->getVar('art_id')) { |
|
69 | + $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
70 | + $message = planet_constant('MD_INSERTERROR'); |
|
71 | + } else { |
|
72 | + $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
73 | + $message = planet_constant('MD_SAVED'); |
|
74 | + } |
|
75 | + redirect_header($redirect, 2, $message); |
|
76 | 76 | } else { |
77 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
77 | + require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
78 | 78 | |
79 | - $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true); |
|
79 | + $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true); |
|
80 | 80 | |
81 | - $form->addElement(new XoopsFormText(planet_constant('MD_TITLE'), 'art_title', 50, 255, $article_obj->getVar('art_title', 'E')), true); |
|
82 | - $form->addElement(new XoopsFormText(planet_constant('MD_LINK'), 'art_link', 50, 255, $article_obj->getVar('art_link', 'E')), true); |
|
83 | - $form->addElement(new XoopsFormText(planet_constant('MD_AUTHOR'), 'art_author', 80, 255, $article_obj->getVar('art_author', 'E'))); |
|
84 | - $form->addElement(new XoopsFormTextArea(planet_constant('MD_CONTENT'), 'art_content', $article_obj->getVar('art_content', 'E')), true); |
|
81 | + $form->addElement(new XoopsFormText(planet_constant('MD_TITLE'), 'art_title', 50, 255, $article_obj->getVar('art_title', 'E')), true); |
|
82 | + $form->addElement(new XoopsFormText(planet_constant('MD_LINK'), 'art_link', 50, 255, $article_obj->getVar('art_link', 'E')), true); |
|
83 | + $form->addElement(new XoopsFormText(planet_constant('MD_AUTHOR'), 'art_author', 80, 255, $article_obj->getVar('art_author', 'E'))); |
|
84 | + $form->addElement(new XoopsFormTextArea(planet_constant('MD_CONTENT'), 'art_content', $article_obj->getVar('art_content', 'E')), true); |
|
85 | 85 | |
86 | - $form->addElement(new XoopsFormHidden('article', $art_id)); |
|
87 | - $form->addElement(new XoopsFormHidden('op', 'save')); |
|
86 | + $form->addElement(new XoopsFormHidden('article', $art_id)); |
|
87 | + $form->addElement(new XoopsFormHidden('op', 'save')); |
|
88 | 88 | |
89 | - $button_tray = new XoopsFormElementTray('', ''); |
|
90 | - $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
91 | - $button_tray->addElement($butt_save); |
|
92 | - $butt_del = new XoopsFormButton('', 'del', _DELETE, 'submit'); |
|
93 | - $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'"); |
|
94 | - $button_tray->addElement($butt_del); |
|
95 | - $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
|
96 | - $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'"); |
|
97 | - $button_tray->addElement($butt_cancel); |
|
98 | - $form->addElement($button_tray); |
|
99 | - $form->display(); |
|
89 | + $button_tray = new XoopsFormElementTray('', ''); |
|
90 | + $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
91 | + $button_tray->addElement($butt_save); |
|
92 | + $butt_del = new XoopsFormButton('', 'del', _DELETE, 'submit'); |
|
93 | + $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'"); |
|
94 | + $button_tray->addElement($butt_del); |
|
95 | + $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
|
96 | + $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'"); |
|
97 | + $button_tray->addElement($butt_cancel); |
|
98 | + $form->addElement($button_tray); |
|
99 | + $form->display(); |
|
100 | 100 | } |
101 | 101 | include XOOPS_ROOT_PATH . '/footer.php'; |
@@ -26,26 +26,26 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | use Xmf\Request; |
28 | 28 | |
29 | -include __DIR__ . '/header.php'; |
|
29 | +include __DIR__.'/header.php'; |
|
30 | 30 | |
31 | -$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
31 | +$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET'); //(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
32 | 32 | if (empty($art_id)) { |
33 | 33 | redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID')); |
34 | 34 | } |
35 | 35 | if (!$xoopsUser->isAdmin()) { |
36 | 36 | redirect_header('javascript:history.go(-1);', 2, _NOPERM); |
37 | 37 | } |
38 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
39 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
38 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
39 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
40 | 40 | |
41 | 41 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
42 | 42 | $article_obj = $articleHandler->get($art_id); |
43 | 43 | |
44 | -$op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : ''; |
|
44 | +$op = Request::getCmd('op', 'check', 'POST'); //isset($_POST['op']) ? $_POST['op'] : ''; |
|
45 | 45 | |
46 | 46 | if ($op === 'del' || !empty(Request::getString('del', '', 'POST'))) { |
47 | 47 | $articleHandler->delete($article_obj); |
48 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
48 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
49 | 49 | $message = planet_constant('MD_SAVED'); |
50 | 50 | redirect_header($redirect, 2, $message); |
51 | 51 | } elseif ($op === 'save') { |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | |
67 | 67 | $art_id_new = $articleHandler->insert($article_obj); |
68 | 68 | if (!$article_obj->getVar('art_id')) { |
69 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
69 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
70 | 70 | $message = planet_constant('MD_INSERTERROR'); |
71 | - } else { |
|
72 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
71 | + }else { |
|
72 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id'); |
|
73 | 73 | $message = planet_constant('MD_SAVED'); |
74 | 74 | } |
75 | 75 | redirect_header($redirect, 2, $message); |
76 | -} else { |
|
77 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
76 | +}else { |
|
77 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
78 | 78 | |
79 | 79 | $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true); |
80 | 80 | |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'"); |
94 | 94 | $button_tray->addElement($butt_del); |
95 | 95 | $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
96 | - $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'"); |
|
96 | + $butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.(int) $art_id."\"'"); |
|
97 | 97 | $button_tray->addElement($butt_cancel); |
98 | 98 | $form->addElement($button_tray); |
99 | 99 | $form->display(); |
100 | 100 | } |
101 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
101 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | include __DIR__ . '/header.php'; |
30 | 30 | |
31 | 31 | if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) { |
32 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
33 | - exit(); |
|
32 | + include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
33 | + exit(); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if ($REQUEST_URI_parsed = PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
37 | - $args['start'] = @$args_num[0]; |
|
38 | - $args['sort'] = @$args_str[0]; |
|
37 | + $args['start'] = @$args_num[0]; |
|
38 | + $args['sort'] = @$args_str[0]; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /* Start */ |
@@ -82,28 +82,28 @@ discard block |
||
82 | 82 | $blog_prefix = ''; |
83 | 83 | /* Specific category */ |
84 | 84 | if ($category_id > 0) { |
85 | - $category_obj = $categoryHandler->get($category_id); |
|
86 | - $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
87 | - $uid = 0; |
|
88 | - $blog_id = 0; |
|
89 | - $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title')); |
|
90 | - $query_type = 'category'; |
|
91 | - $blog_prefix = 'b.'; |
|
85 | + $category_obj = $categoryHandler->get($category_id); |
|
86 | + $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
87 | + $uid = 0; |
|
88 | + $blog_id = 0; |
|
89 | + $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title')); |
|
90 | + $query_type = 'category'; |
|
91 | + $blog_prefix = 'b.'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /* User bookmarks(favorites) */ |
95 | 95 | if ($uid > 0) { |
96 | - $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
97 | - $category_id = 0; |
|
98 | - $blog_id = 0; |
|
99 | - $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
100 | - $user_data = array( |
|
101 | - 'uid' => $uid, |
|
102 | - 'name' => XoopsUser::getUnameFromId($uid), |
|
103 | - 'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid)) |
|
104 | - ); |
|
105 | - $query_type = 'bookmark'; |
|
106 | - $blog_prefix = 'b.'; |
|
96 | + $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
97 | + $category_id = 0; |
|
98 | + $blog_id = 0; |
|
99 | + $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
100 | + $user_data = array( |
|
101 | + 'uid' => $uid, |
|
102 | + 'name' => XoopsUser::getUnameFromId($uid), |
|
103 | + 'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid)) |
|
104 | + ); |
|
105 | + $query_type = 'bookmark'; |
|
106 | + $blog_prefix = 'b.'; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | $criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>')); |
@@ -112,20 +112,20 @@ discard block |
||
112 | 112 | $order = 'DESC'; |
113 | 113 | $sort = empty($sort) ? 'default' : $sort; |
114 | 114 | switch ($sort) { |
115 | - case 'marks': |
|
116 | - $sortby = $blog_prefix . 'blog_marks'; |
|
117 | - break; |
|
118 | - case 'rating': |
|
119 | - $sortby = $blog_prefix . 'blog_rating'; |
|
120 | - break; |
|
121 | - case 'time': |
|
122 | - $sortby = $blog_prefix . 'blog_time'; |
|
123 | - break; |
|
124 | - case 'default': |
|
125 | - default: |
|
126 | - $sort = 'default'; |
|
127 | - $sortby = $blog_prefix . 'blog_id'; |
|
128 | - break; |
|
115 | + case 'marks': |
|
116 | + $sortby = $blog_prefix . 'blog_marks'; |
|
117 | + break; |
|
118 | + case 'rating': |
|
119 | + $sortby = $blog_prefix . 'blog_rating'; |
|
120 | + break; |
|
121 | + case 'time': |
|
122 | + $sortby = $blog_prefix . 'blog_time'; |
|
123 | + break; |
|
124 | + case 'default': |
|
125 | + default: |
|
126 | + $sort = 'default'; |
|
127 | + $sortby = $blog_prefix . 'blog_id'; |
|
128 | + break; |
|
129 | 129 | } |
130 | 130 | $criteria->setSort($sortby); |
131 | 131 | $criteria->setOrder($order); |
@@ -134,93 +134,93 @@ discard block |
||
134 | 134 | |
135 | 135 | $tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time'); |
136 | 136 | switch ($query_type) { |
137 | - case 'category': |
|
138 | - $blogs_obj = $blogHandler->getByCategory($criteria, $tags); |
|
139 | - $count_blog = $blogHandler->getCountByCategory($criteria); |
|
140 | - break; |
|
141 | - case 'bookmark': |
|
142 | - $blogs_obj = $blogHandler->getByBookmark($criteria, $tags); |
|
143 | - $count_blog = $blogHandler->getCountByBookmark($criteria); |
|
144 | - break; |
|
145 | - default: |
|
146 | - $blogs_obj = $blogHandler->getAll($criteria, $tags); |
|
147 | - $count_blog = $blogHandler->getCount($criteria); |
|
148 | - break; |
|
137 | + case 'category': |
|
138 | + $blogs_obj = $blogHandler->getByCategory($criteria, $tags); |
|
139 | + $count_blog = $blogHandler->getCountByCategory($criteria); |
|
140 | + break; |
|
141 | + case 'bookmark': |
|
142 | + $blogs_obj = $blogHandler->getByBookmark($criteria, $tags); |
|
143 | + $count_blog = $blogHandler->getCountByBookmark($criteria); |
|
144 | + break; |
|
145 | + default: |
|
146 | + $blogs_obj = $blogHandler->getAll($criteria, $tags); |
|
147 | + $count_blog = $blogHandler->getCount($criteria); |
|
148 | + break; |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /* Objects to array */ |
152 | 152 | $blogs = array(); |
153 | 153 | foreach (array_keys($blogs_obj) as $id) { |
154 | - $_blog = array( |
|
155 | - 'id' => $id, |
|
156 | - 'title' => $blogs_obj[$id]->getVar('blog_title'), |
|
157 | - 'time' => $blogs_obj[$id]->getTime() |
|
158 | - ); |
|
159 | - if (empty($list)) { |
|
160 | - $_blog = array_merge($_blog, array( |
|
161 | - 'image' => $blogs_obj[$id]->getImage(), |
|
162 | - 'feed' => $blogs_obj[$id]->getVar('blog_feed'), |
|
163 | - 'link' => $blogs_obj[$id]->getVar('blog_link'), |
|
164 | - 'desc' => $blogs_obj[$id]->getVar('blog_desc'), |
|
165 | - 'star' => $blogs_obj[$id]->getStar(), |
|
166 | - 'rates' => $blogs_obj[$id]->getVar('blog_rates'), |
|
167 | - 'marks' => $blogs_obj[$id]->getVar('blog_marks') |
|
168 | - )); |
|
169 | - } |
|
170 | - $blogs[] = $_blog; |
|
171 | - unset($_blog); |
|
154 | + $_blog = array( |
|
155 | + 'id' => $id, |
|
156 | + 'title' => $blogs_obj[$id]->getVar('blog_title'), |
|
157 | + 'time' => $blogs_obj[$id]->getTime() |
|
158 | + ); |
|
159 | + if (empty($list)) { |
|
160 | + $_blog = array_merge($_blog, array( |
|
161 | + 'image' => $blogs_obj[$id]->getImage(), |
|
162 | + 'feed' => $blogs_obj[$id]->getVar('blog_feed'), |
|
163 | + 'link' => $blogs_obj[$id]->getVar('blog_link'), |
|
164 | + 'desc' => $blogs_obj[$id]->getVar('blog_desc'), |
|
165 | + 'star' => $blogs_obj[$id]->getStar(), |
|
166 | + 'rates' => $blogs_obj[$id]->getVar('blog_rates'), |
|
167 | + 'marks' => $blogs_obj[$id]->getVar('blog_marks') |
|
168 | + )); |
|
169 | + } |
|
170 | + $blogs[] = $_blog; |
|
171 | + unset($_blog); |
|
172 | 172 | } |
173 | 173 | unset($blogs_obj); |
174 | 174 | |
175 | 175 | if ($count_blog > $limit) { |
176 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
177 | - $start_link = array(); |
|
178 | - if ($sort) { |
|
179 | - $start_link[] = 'sort=' . $sort; |
|
180 | - } |
|
181 | - if ($category_id) { |
|
182 | - $start_link[] = 'category=' . $category_id; |
|
183 | - } |
|
184 | - if ($list) { |
|
185 | - $start_link[] = 'list=' . $list; |
|
186 | - } |
|
187 | - $nav = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link)); |
|
188 | - $pagenav = $nav->renderNav(4); |
|
176 | + include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
177 | + $start_link = array(); |
|
178 | + if ($sort) { |
|
179 | + $start_link[] = 'sort=' . $sort; |
|
180 | + } |
|
181 | + if ($category_id) { |
|
182 | + $start_link[] = 'category=' . $category_id; |
|
183 | + } |
|
184 | + if ($list) { |
|
185 | + $start_link[] = 'list=' . $list; |
|
186 | + } |
|
187 | + $nav = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link)); |
|
188 | + $pagenav = $nav->renderNav(4); |
|
189 | 189 | } else { |
190 | - $pagenav = ''; |
|
190 | + $pagenav = ''; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']); |
194 | 194 | $xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>'); |
195 | 195 | |
196 | 196 | if ($category_id || $uid) { |
197 | - $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
197 | + $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
198 | 198 | |
199 | - $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>'; |
|
200 | - $xoopsTpl->assign('link_articles', $link_articles); |
|
199 | + $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>'; |
|
200 | + $xoopsTpl->assign('link_articles', $link_articles); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | $link_switch = "<a href=\"" |
204 | - . XOOPS_URL |
|
205 | - . '/modules/' |
|
206 | - . $GLOBALS['moddirname'] |
|
207 | - . '/view.blogs.php' |
|
208 | - . (empty($category_id) ? '' : '/c' . $category_id) |
|
209 | - . (empty($uid) ? '' : '/u' . $uid) |
|
210 | - . (empty($list) ? '/l1' : '') |
|
211 | - . "\" title=\"" |
|
212 | - . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
213 | - . "\">" |
|
214 | - . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
215 | - . '</a>'; |
|
204 | + . XOOPS_URL |
|
205 | + . '/modules/' |
|
206 | + . $GLOBALS['moddirname'] |
|
207 | + . '/view.blogs.php' |
|
208 | + . (empty($category_id) ? '' : '/c' . $category_id) |
|
209 | + . (empty($uid) ? '' : '/u' . $uid) |
|
210 | + . (empty($list) ? '/l1' : '') |
|
211 | + . "\" title=\"" |
|
212 | + . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
213 | + . "\">" |
|
214 | + . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
215 | + . '</a>'; |
|
216 | 216 | $xoopsTpl->assign('link_switch', $link_switch); |
217 | 217 | |
218 | 218 | if (empty($uid) && is_object($xoopsUser)) { |
219 | - $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
219 | + $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) { |
223 | - $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
223 | + $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | $xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS')); |
@@ -234,35 +234,35 @@ discard block |
||
234 | 234 | $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
235 | 235 | if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) { |
236 | 236 | } elseif (!$list) { |
237 | - $xoopsTpl->assign('canrate', 1); |
|
237 | + $xoopsTpl->assign('canrate', 1); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | $sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER; |
241 | 241 | $vars = array(); |
242 | 242 | if (!empty($category_id)) { |
243 | - $vars[] = 'c' . $category_id; |
|
243 | + $vars[] = 'c' . $category_id; |
|
244 | 244 | } |
245 | 245 | if (!empty($uid)) { |
246 | - $vars[] = 'u' . $uid; |
|
246 | + $vars[] = 'u' . $uid; |
|
247 | 247 | } |
248 | 248 | if (!empty($list)) { |
249 | - $vars[] = 'li'; |
|
249 | + $vars[] = 'li'; |
|
250 | 250 | } |
251 | 251 | if (!empty($vars)) { |
252 | - $sort_link .= implode('/', $vars) . '/'; |
|
252 | + $sort_link .= implode('/', $vars) . '/'; |
|
253 | 253 | } |
254 | 254 | $sortlinks = array(); |
255 | 255 | $valid_sorts = array( |
256 | - 'marks' => planet_constant('MD_BOOKMARKS'), |
|
257 | - 'rating' => planet_constant('MD_RATING'), |
|
258 | - 'time' => planet_constant('MD_TIME'), |
|
259 | - 'default' => planet_constant('MD_DEFAULT') |
|
256 | + 'marks' => planet_constant('MD_BOOKMARKS'), |
|
257 | + 'rating' => planet_constant('MD_RATING'), |
|
258 | + 'time' => planet_constant('MD_TIME'), |
|
259 | + 'default' => planet_constant('MD_DEFAULT') |
|
260 | 260 | ); |
261 | 261 | foreach ($valid_sorts as $val => $name) { |
262 | - if ($val == $sort) { |
|
263 | - continue; |
|
264 | - } |
|
265 | - $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>'; |
|
262 | + if ($val == $sort) { |
|
263 | + continue; |
|
264 | + } |
|
265 | + $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>'; |
|
266 | 266 | } |
267 | 267 | $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks)); |
268 | 268 |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | use Xmf\Request; |
28 | 28 | |
29 | -include __DIR__ . '/header.php'; |
|
29 | +include __DIR__.'/header.php'; |
|
30 | 30 | |
31 | 31 | if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) { |
32 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
32 | + include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
|
33 | 33 | exit(); |
34 | 34 | } |
35 | 35 | |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | } |
67 | 67 | */ |
68 | 68 | |
69 | -$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_BLOGS'); |
|
69 | +$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_BLOGS'); |
|
70 | 70 | $xoopsOption['template_main'] = PlanetUtility::planetGetTemplate('blogs'); |
71 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
72 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
71 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
72 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
73 | 73 | |
74 | 74 | // Following part will not be executed after cache |
75 | 75 | $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $criteria = new CriteriaCompo(); |
82 | 82 | $blog_prefix = ''; |
83 | 83 | /* Specific category */ |
84 | -if ($category_id > 0) { |
|
84 | +if ($category_id>0) { |
|
85 | 85 | $category_obj = $categoryHandler->get($category_id); |
86 | 86 | $criteria->add(new Criteria('bc.cat_id', $category_id)); |
87 | 87 | $uid = 0; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /* User bookmarks(favorites) */ |
95 | -if ($uid > 0) { |
|
95 | +if ($uid>0) { |
|
96 | 96 | $criteria->add(new Criteria('bm.bm_uid', $uid)); |
97 | 97 | $category_id = 0; |
98 | 98 | $blog_id = 0; |
@@ -106,25 +106,25 @@ discard block |
||
106 | 106 | $blog_prefix = 'b.'; |
107 | 107 | } |
108 | 108 | |
109 | -$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>')); |
|
109 | +$criteria->add(new Criteria($blog_prefix.'blog_status', 0, '>')); |
|
110 | 110 | |
111 | 111 | /* Sort */ |
112 | 112 | $order = 'DESC'; |
113 | 113 | $sort = empty($sort) ? 'default' : $sort; |
114 | 114 | switch ($sort) { |
115 | 115 | case 'marks': |
116 | - $sortby = $blog_prefix . 'blog_marks'; |
|
116 | + $sortby = $blog_prefix.'blog_marks'; |
|
117 | 117 | break; |
118 | 118 | case 'rating': |
119 | - $sortby = $blog_prefix . 'blog_rating'; |
|
119 | + $sortby = $blog_prefix.'blog_rating'; |
|
120 | 120 | break; |
121 | 121 | case 'time': |
122 | - $sortby = $blog_prefix . 'blog_time'; |
|
122 | + $sortby = $blog_prefix.'blog_time'; |
|
123 | 123 | break; |
124 | 124 | case 'default': |
125 | 125 | default: |
126 | 126 | $sort = 'default'; |
127 | - $sortby = $blog_prefix . 'blog_id'; |
|
127 | + $sortby = $blog_prefix.'blog_id'; |
|
128 | 128 | break; |
129 | 129 | } |
130 | 130 | $criteria->setSort($sortby); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $criteria->setStart($start); |
133 | 133 | $criteria->setLimit($limit); |
134 | 134 | |
135 | -$tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time'); |
|
135 | +$tags = empty($list) ? '' : array($blog_prefix.'blog_title', $blog_prefix.'blog_time'); |
|
136 | 136 | switch ($query_type) { |
137 | 137 | case 'category': |
138 | 138 | $blogs_obj = $blogHandler->getByCategory($criteria, $tags); |
@@ -172,31 +172,31 @@ discard block |
||
172 | 172 | } |
173 | 173 | unset($blogs_obj); |
174 | 174 | |
175 | -if ($count_blog > $limit) { |
|
176 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
175 | +if ($count_blog>$limit) { |
|
176 | + include XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
177 | 177 | $start_link = array(); |
178 | 178 | if ($sort) { |
179 | - $start_link[] = 'sort=' . $sort; |
|
179 | + $start_link[] = 'sort='.$sort; |
|
180 | 180 | } |
181 | 181 | if ($category_id) { |
182 | - $start_link[] = 'category=' . $category_id; |
|
182 | + $start_link[] = 'category='.$category_id; |
|
183 | 183 | } |
184 | 184 | if ($list) { |
185 | - $start_link[] = 'list=' . $list; |
|
185 | + $start_link[] = 'list='.$list; |
|
186 | 186 | } |
187 | 187 | $nav = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link)); |
188 | 188 | $pagenav = $nav->renderNav(4); |
189 | -} else { |
|
189 | +}else { |
|
190 | 190 | $pagenav = ''; |
191 | 191 | } |
192 | 192 | |
193 | 193 | $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']); |
194 | -$xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>'); |
|
194 | +$xoopsTpl->assign('link_home', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_HOME')."\" target=\"_self\">".planet_constant('MD_HOME').'</a>'); |
|
195 | 195 | |
196 | 196 | if ($category_id || $uid) { |
197 | - $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
197 | + $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/view.blogs.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>'); |
|
198 | 198 | |
199 | - $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>'; |
|
199 | + $link_articles = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_ARTICLES')."\">".planet_constant('MD_ARTICLES').'</a>'; |
|
200 | 200 | $xoopsTpl->assign('link_articles', $link_articles); |
201 | 201 | } |
202 | 202 | |
@@ -205,8 +205,8 @@ discard block |
||
205 | 205 | . '/modules/' |
206 | 206 | . $GLOBALS['moddirname'] |
207 | 207 | . '/view.blogs.php' |
208 | - . (empty($category_id) ? '' : '/c' . $category_id) |
|
209 | - . (empty($uid) ? '' : '/u' . $uid) |
|
208 | + . (empty($category_id) ? '' : '/c'.$category_id) |
|
209 | + . (empty($uid) ? '' : '/u'.$uid) |
|
210 | 210 | . (empty($list) ? '/l1' : '') |
211 | 211 | . "\" title=\"" |
212 | 212 | . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
@@ -216,14 +216,14 @@ discard block |
||
216 | 216 | $xoopsTpl->assign('link_switch', $link_switch); |
217 | 217 | |
218 | 218 | if (empty($uid) && is_object($xoopsUser)) { |
219 | - $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
219 | + $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>'); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) { |
223 | - $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
223 | + $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>'); |
|
224 | 224 | } |
225 | 225 | |
226 | -$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS')); |
|
226 | +$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_BLOGS')); |
|
227 | 227 | $xoopsTpl->assign('category', @$category_data); |
228 | 228 | $xoopsTpl->assign('user', @$user_data); |
229 | 229 | $xoopsTpl->assign('blogs', $blogs); |
@@ -237,19 +237,19 @@ discard block |
||
237 | 237 | $xoopsTpl->assign('canrate', 1); |
238 | 238 | } |
239 | 239 | |
240 | -$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER; |
|
240 | +$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER; |
|
241 | 241 | $vars = array(); |
242 | 242 | if (!empty($category_id)) { |
243 | - $vars[] = 'c' . $category_id; |
|
243 | + $vars[] = 'c'.$category_id; |
|
244 | 244 | } |
245 | 245 | if (!empty($uid)) { |
246 | - $vars[] = 'u' . $uid; |
|
246 | + $vars[] = 'u'.$uid; |
|
247 | 247 | } |
248 | 248 | if (!empty($list)) { |
249 | 249 | $vars[] = 'li'; |
250 | 250 | } |
251 | 251 | if (!empty($vars)) { |
252 | - $sort_link .= implode('/', $vars) . '/'; |
|
252 | + $sort_link .= implode('/', $vars).'/'; |
|
253 | 253 | } |
254 | 254 | $sortlinks = array(); |
255 | 255 | $valid_sorts = array( |
@@ -262,8 +262,8 @@ discard block |
||
262 | 262 | if ($val == $sort) { |
263 | 263 | continue; |
264 | 264 | } |
265 | - $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>'; |
|
265 | + $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name.'</a>'; |
|
266 | 266 | } |
267 | 267 | $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks)); |
268 | 268 | |
269 | -require_once __DIR__ . '/footer.php'; |
|
269 | +require_once __DIR__.'/footer.php'; |
@@ -31,44 +31,44 @@ discard block |
||
31 | 31 | error_reporting(0); |
32 | 32 | |
33 | 33 | if (empty(Request::getString('print_data', '', 'POST'))) { |
34 | - //$_POST['print_data'])) |
|
34 | + //$_POST['print_data'])) |
|
35 | 35 | |
36 | - if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
|
37 | - $args['article'] = @$args_num[0]; |
|
38 | - } |
|
36 | + if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
|
37 | + $args['article'] = @$args_num[0]; |
|
38 | + } |
|
39 | 39 | |
40 | - $article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
40 | + $article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
41 | 41 | |
42 | - $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
|
43 | - $article_obj = $articleHandler->get($article_id); |
|
42 | + $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
|
43 | + $article_obj = $articleHandler->get($article_id); |
|
44 | 44 | |
45 | - $article_data = array(); |
|
45 | + $article_data = array(); |
|
46 | 46 | |
47 | - // title |
|
48 | - $article_data['title'] = $article_obj->getVar('art_title'); |
|
47 | + // title |
|
48 | + $article_data['title'] = $article_obj->getVar('art_title'); |
|
49 | 49 | |
50 | - $article_data['author'] = $article_obj->getVar('art_author'); |
|
50 | + $article_data['author'] = $article_obj->getVar('art_author'); |
|
51 | 51 | |
52 | - // source |
|
53 | - $article_data['source'] = $article_obj->getVar('art_link'); |
|
52 | + // source |
|
53 | + $article_data['source'] = $article_obj->getVar('art_link'); |
|
54 | 54 | |
55 | - // publish time |
|
56 | - $article_data['time'] = $article_obj->getTime('l'); |
|
55 | + // publish time |
|
56 | + $article_data['time'] = $article_obj->getTime('l'); |
|
57 | 57 | |
58 | - // summary |
|
59 | - $article_data['summary'] =& $article_obj->getSummary(); |
|
58 | + // summary |
|
59 | + $article_data['summary'] =& $article_obj->getSummary(); |
|
60 | 60 | |
61 | - // text of page |
|
62 | - $article_data['text'] = $article_obj->getVar('art_content'); |
|
61 | + // text of page |
|
62 | + $article_data['text'] = $article_obj->getVar('art_content'); |
|
63 | 63 | |
64 | - $print_data['title'] = $article_data['title']; |
|
65 | - $print_data['author'] = $article_data['author']; |
|
66 | - $print_data['date'] = $article_data['time']; |
|
67 | - $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': ' . $article_data['summary']; |
|
68 | - $print_data['content'] = $article_data['text']; |
|
69 | - $print_data['url'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/view.article.php' . URL_DELIMITER . 'c' . $category_id . '/' . $article_id . '/p' . $page; |
|
64 | + $print_data['title'] = $article_data['title']; |
|
65 | + $print_data['author'] = $article_data['author']; |
|
66 | + $print_data['date'] = $article_data['time']; |
|
67 | + $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': ' . $article_data['summary']; |
|
68 | + $print_data['content'] = $article_data['text']; |
|
69 | + $print_data['url'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/view.article.php' . URL_DELIMITER . 'c' . $category_id . '/' . $article_id . '/p' . $page; |
|
70 | 70 | } else { |
71 | - $print_data = unserialize(base64_decode(Request::getString('print_data', '', 'POST')));//$_POST['print_data'])); |
|
71 | + $print_data = unserialize(base64_decode(Request::getString('print_data', '', 'POST')));//$_POST['print_data'])); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | $print_data['image'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->getInfo('image'); |
@@ -99,36 +99,36 @@ discard block |
||
99 | 99 | </style>\n"; |
100 | 100 | echo "</head>\n"; |
101 | 101 | echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n" |
102 | - . "<div style='float:center; width: 750px; border: 1px solid #000; padding: 20px;'>\n" |
|
103 | - . "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n" |
|
104 | - . "<img src='" |
|
105 | - . $print_data['image'] |
|
106 | - . "' border='0' alt='" |
|
107 | - . $print_data['module'] |
|
108 | - . "'>\n" |
|
109 | - . '<h2>' |
|
110 | - . $print_data['title'] |
|
111 | - . "</h2>\n" |
|
112 | - . "</div>\n" |
|
113 | - . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n"; |
|
102 | + . "<div style='float:center; width: 750px; border: 1px solid #000; padding: 20px;'>\n" |
|
103 | + . "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n" |
|
104 | + . "<img src='" |
|
105 | + . $print_data['image'] |
|
106 | + . "' border='0' alt='" |
|
107 | + . $print_data['module'] |
|
108 | + . "'>\n" |
|
109 | + . '<h2>' |
|
110 | + . $print_data['title'] |
|
111 | + . "</h2>\n" |
|
112 | + . "</div>\n" |
|
113 | + . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n"; |
|
114 | 114 | echo(empty($print_data['author']) ? '' : '<div>' . planet_constant('MD_AUTHOR') . ': ' . $print_data['author'] . "</div>\n") |
115 | - . '<div>' |
|
116 | - . planet_constant('MD_DATE') |
|
117 | - . ': ' |
|
118 | - . $print_data['date'] |
|
119 | - . "</div>\n" |
|
120 | - . (empty($article_data['summary']) ? '' : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" . '<div>' . $print_data['summary'] . "</div>\n") |
|
121 | - . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" |
|
122 | - . '<div>' |
|
123 | - . $print_data['content'] |
|
124 | - . "</div>\n" |
|
125 | - . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n" |
|
126 | - . '<div>' |
|
127 | - . $print_data['module'] |
|
128 | - . "</div>\n" |
|
129 | - . '<div>URL: ' |
|
130 | - . $print_data['url'] |
|
131 | - . "</div>\n" |
|
132 | - . "</div>\n" |
|
133 | - . "</body>\n</html>\n"; |
|
115 | + . '<div>' |
|
116 | + . planet_constant('MD_DATE') |
|
117 | + . ': ' |
|
118 | + . $print_data['date'] |
|
119 | + . "</div>\n" |
|
120 | + . (empty($article_data['summary']) ? '' : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" . '<div>' . $print_data['summary'] . "</div>\n") |
|
121 | + . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" |
|
122 | + . '<div>' |
|
123 | + . $print_data['content'] |
|
124 | + . "</div>\n" |
|
125 | + . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n" |
|
126 | + . '<div>' |
|
127 | + . $print_data['module'] |
|
128 | + . "</div>\n" |
|
129 | + . '<div>URL: ' |
|
130 | + . $print_data['url'] |
|
131 | + . "</div>\n" |
|
132 | + . "</div>\n" |
|
133 | + . "</body>\n</html>\n"; |
|
134 | 134 | exit(); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | use Xmf\Request; |
28 | 28 | |
29 | 29 | error_reporting(0); |
30 | -include __DIR__ . '/header.php'; |
|
30 | +include __DIR__.'/header.php'; |
|
31 | 31 | error_reporting(0); |
32 | 32 | |
33 | 33 | if (empty(Request::getString('print_data', '', 'POST'))) { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $args['article'] = @$args_num[0]; |
38 | 38 | } |
39 | 39 | |
40 | - $article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
40 | + $article_id = Request::getInt('article', @$args['article'], 'POST'); //(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
41 | 41 | |
42 | 42 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
43 | 43 | $article_obj = $articleHandler->get($article_id); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $article_data['time'] = $article_obj->getTime('l'); |
57 | 57 | |
58 | 58 | // summary |
59 | - $article_data['summary'] =& $article_obj->getSummary(); |
|
59 | + $article_data['summary'] = & $article_obj->getSummary(); |
|
60 | 60 | |
61 | 61 | // text of page |
62 | 62 | $article_data['text'] = $article_obj->getVar('art_content'); |
@@ -64,25 +64,25 @@ discard block |
||
64 | 64 | $print_data['title'] = $article_data['title']; |
65 | 65 | $print_data['author'] = $article_data['author']; |
66 | 66 | $print_data['date'] = $article_data['time']; |
67 | - $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': ' . $article_data['summary']; |
|
67 | + $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY').': '.$article_data['summary']; |
|
68 | 68 | $print_data['content'] = $article_data['text']; |
69 | - $print_data['url'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/view.article.php' . URL_DELIMITER . 'c' . $category_id . '/' . $article_id . '/p' . $page; |
|
70 | -} else { |
|
71 | - $print_data = unserialize(base64_decode(Request::getString('print_data', '', 'POST')));//$_POST['print_data'])); |
|
69 | + $print_data['url'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/view.article.php'.URL_DELIMITER.'c'.$category_id.'/'.$article_id.'/p'.$page; |
|
70 | +}else { |
|
71 | + $print_data = unserialize(base64_decode(Request::getString('print_data', '', 'POST'))); //$_POST['print_data'])); |
|
72 | 72 | } |
73 | 73 | |
74 | -$print_data['image'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->getInfo('image'); |
|
75 | -$print_data['module'] = $xoopsModule->getVar('name') . ' V' . $xoopsModule->getInfo('version'); |
|
74 | +$print_data['image'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'.$xoopsModule->getInfo('image'); |
|
75 | +$print_data['module'] = $xoopsModule->getVar('name').' V'.$xoopsModule->getInfo('version'); |
|
76 | 76 | |
77 | -header('Content-Type: text/html; charset=' . _CHARSET); |
|
77 | +header('Content-Type: text/html; charset='._CHARSET); |
|
78 | 78 | echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n"; |
79 | 79 | echo "<html>\n<head>\n"; |
80 | -echo '<title>' . $xoopsConfig['sitename'] . "</title>\n"; |
|
81 | -echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "'>\n"; |
|
82 | -echo "<meta name='AUTHOR' content='" . $myts->htmlSpecialChars($xoopsConfig['sitename']) . "'>\n"; |
|
83 | -echo "<meta name='COPYRIGHT' content='Copyright (c) " . date('Y') . ' by ' . $xoopsConfig['sitename'] . "'>\n"; |
|
84 | -echo "<meta name='DESCRIPTION' content='" . $myts->htmlSpecialChars($xoopsConfig['slogan']) . "'>\n"; |
|
85 | -echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "'>\n"; |
|
80 | +echo '<title>'.$xoopsConfig['sitename']."</title>\n"; |
|
81 | +echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."'>\n"; |
|
82 | +echo "<meta name='AUTHOR' content='".$myts->htmlSpecialChars($xoopsConfig['sitename'])."'>\n"; |
|
83 | +echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y').' by '.$xoopsConfig['sitename']."'>\n"; |
|
84 | +echo "<meta name='DESCRIPTION' content='".$myts->htmlSpecialChars($xoopsConfig['slogan'])."'>\n"; |
|
85 | +echo "<meta name='GENERATOR' content='".XOOPS_VERSION."'>\n"; |
|
86 | 86 | echo "<style type='text/css'> |
87 | 87 | body { |
88 | 88 | color:#000000; |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | . "</h2>\n" |
112 | 112 | . "</div>\n" |
113 | 113 | . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n"; |
114 | -echo(empty($print_data['author']) ? '' : '<div>' . planet_constant('MD_AUTHOR') . ': ' . $print_data['author'] . "</div>\n") |
|
114 | +echo(empty($print_data['author']) ? '' : '<div>'.planet_constant('MD_AUTHOR').': '.$print_data['author']."</div>\n") |
|
115 | 115 | . '<div>' |
116 | 116 | . planet_constant('MD_DATE') |
117 | 117 | . ': ' |
118 | 118 | . $print_data['date'] |
119 | 119 | . "</div>\n" |
120 | - . (empty($article_data['summary']) ? '' : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" . '<div>' . $print_data['summary'] . "</div>\n") |
|
120 | + . (empty($article_data['summary']) ? '' : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n".'<div>'.$print_data['summary']."</div>\n") |
|
121 | 121 | . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" |
122 | 122 | . '<div>' |
123 | 123 | . $print_data['content'] |
@@ -17,5 +17,5 @@ |
||
17 | 17 | * @author XOOPS Development Team, Kazumi Ono (AKA onokazu) |
18 | 18 | */ |
19 | 19 | |
20 | -include __DIR__ . '/../../mainfile.php'; |
|
21 | -include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
20 | +include __DIR__.'/../../mainfile.php'; |
|
21 | +include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
@@ -34,17 +34,17 @@ discard block |
||
34 | 34 | * |
35 | 35 | */ |
36 | 36 | if (preg_match("/(\/comment_[^\.]*\.php\?.*=.*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {//$_SERVER['REQUEST_URI'] |
37 | - header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]); |
|
38 | - exit(); |
|
37 | + header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]); |
|
38 | + exit(); |
|
39 | 39 | } |
40 | 40 | if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) { |
41 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
42 | - exit(); |
|
41 | + include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
42 | + exit(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($REQUEST_URI_parsed = PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
46 | - $args['article'] = @$args_num[0]; |
|
47 | - $args['blog'] = @$args['blog']; |
|
46 | + $args['article'] = @$args_num[0]; |
|
47 | + $args['blog'] = @$args['blog']; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | $article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // restore $_SERVER['REQUEST_URI'] |
59 | 59 | if (!empty($REQUEST_URI_parsed)) { |
60 | - $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id); |
|
60 | + $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . $article_obj->getVar('art_title'); |
@@ -66,29 +66,29 @@ discard block |
||
66 | 66 | include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
67 | 67 | |
68 | 68 | $article_data = array( |
69 | - 'id' => $article_id, |
|
70 | - 'title' => $article_obj->getVar('art_title'), |
|
71 | - 'content' => $article_obj->getVar('art_content'), |
|
72 | - 'author' => $article_obj->getVar('art_author'), |
|
73 | - 'time' => $article_obj->getTime(), |
|
74 | - 'link' => $article_obj->getVar('art_link'), |
|
75 | - 'views' => $article_obj->getVar('art_views'), |
|
76 | - 'comments' => $article_obj->getVar('art_comments'), |
|
77 | - 'star' => $article_obj->getStar(), |
|
78 | - 'rates' => $article_obj->getVar('art_rates'), |
|
79 | - 'blog' => array('id' => $article_obj->getVar('blog_id'), 'title' => $blog_obj->getVar('blog_title')) |
|
69 | + 'id' => $article_id, |
|
70 | + 'title' => $article_obj->getVar('art_title'), |
|
71 | + 'content' => $article_obj->getVar('art_content'), |
|
72 | + 'author' => $article_obj->getVar('art_author'), |
|
73 | + 'time' => $article_obj->getTime(), |
|
74 | + 'link' => $article_obj->getVar('art_link'), |
|
75 | + 'views' => $article_obj->getVar('art_views'), |
|
76 | + 'comments' => $article_obj->getVar('art_comments'), |
|
77 | + 'star' => $article_obj->getStar(), |
|
78 | + 'rates' => $article_obj->getVar('art_rates'), |
|
79 | + 'blog' => array('id' => $article_obj->getVar('blog_id'), 'title' => $blog_obj->getVar('blog_title')) |
|
80 | 80 | ); |
81 | 81 | |
82 | 82 | if (!empty($xoopsModuleConfig['do_sibling'])) { |
83 | - $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id); |
|
84 | - if (!empty($articles_sibling['previous'])) { |
|
85 | - $articles_sibling['previous']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id; |
|
86 | - $articles_sibling['previous']['title'] = $articles_sibling['previous']['title']; |
|
87 | - } |
|
88 | - if (!empty($articles_sibling['next'])) { |
|
89 | - $articles_sibling['next']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id; |
|
90 | - $articles_sibling['next']['title'] = $articles_sibling['next']['title']; |
|
91 | - } |
|
83 | + $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id); |
|
84 | + if (!empty($articles_sibling['previous'])) { |
|
85 | + $articles_sibling['previous']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id; |
|
86 | + $articles_sibling['previous']['title'] = $articles_sibling['previous']['title']; |
|
87 | + } |
|
88 | + if (!empty($articles_sibling['next'])) { |
|
89 | + $articles_sibling['next']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id; |
|
90 | + $articles_sibling['next']['title'] = $articles_sibling['next']['title']; |
|
91 | + } |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $xoopsTpl->assign('modulename', $xoopsModule->getVar('name')); |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
100 | 100 | if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) { |
101 | 101 | } else { |
102 | - $xoopsTpl->assign('canrate', 1); |
|
102 | + $xoopsTpl->assign('canrate', 1); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | if ($transferbar = @include XOOPS_ROOT_PATH . '/Frameworks/transfer/bar.transfer.php') { |
106 | - $xoopsTpl->assign('transfer', $transferbar); |
|
106 | + $xoopsTpl->assign('transfer', $transferbar); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | // Loading module meta data, NOT THE RIGHT WAY DOING IT |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | use Xmf\Request; |
28 | 28 | |
29 | -include __DIR__ . '/header.php'; |
|
29 | +include __DIR__.'/header.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * The comment detection scripts should be removed once absolute url is used in comment_view.php |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | * |
35 | 35 | */ |
36 | 36 | if (preg_match("/(\/comment_[^\.]*\.php\?.*=.*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {//$_SERVER['REQUEST_URI'] |
37 | - header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]); |
|
37 | + header('location: '.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].$matches[1]); |
|
38 | 38 | exit(); |
39 | 39 | } |
40 | 40 | if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) { |
41 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
41 | + include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
|
42 | 42 | exit(); |
43 | 43 | } |
44 | 44 | |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | $args['blog'] = @$args['blog']; |
48 | 48 | } |
49 | 49 | |
50 | -$article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
51 | -$blog_id = Request::getInt('blog', @$args['blog'], 'POST');//(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']); |
|
50 | +$article_id = Request::getInt('article', @$args['article'], 'POST'); //(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']); |
|
51 | +$blog_id = Request::getInt('blog', @$args['blog'], 'POST'); //(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']); |
|
52 | 52 | |
53 | 53 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
54 | 54 | $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']); |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | |
58 | 58 | // restore $_SERVER['REQUEST_URI'] |
59 | 59 | if (!empty($REQUEST_URI_parsed)) { |
60 | - $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id); |
|
60 | + $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.(empty($article_id) ? '' : '?article='.$article_id); |
|
61 | 61 | } |
62 | 62 | |
63 | -$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . $article_obj->getVar('art_title'); |
|
63 | +$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.$article_obj->getVar('art_title'); |
|
64 | 64 | $xoopsOption['template_main'] = PlanetUtility::planetGetTemplate('article'); |
65 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
66 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
65 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
66 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
67 | 67 | |
68 | 68 | $article_data = array( |
69 | 69 | 'id' => $article_id, |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | if (!empty($xoopsModuleConfig['do_sibling'])) { |
83 | 83 | $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id); |
84 | 84 | if (!empty($articles_sibling['previous'])) { |
85 | - $articles_sibling['previous']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id; |
|
85 | + $articles_sibling['previous']['url'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['previous']['id'].'/b'.$blog_id; |
|
86 | 86 | $articles_sibling['previous']['title'] = $articles_sibling['previous']['title']; |
87 | 87 | } |
88 | 88 | if (!empty($articles_sibling['next'])) { |
89 | - $articles_sibling['next']['url'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id; |
|
89 | + $articles_sibling['next']['url'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['next']['id'].'/b'.$blog_id; |
|
90 | 90 | $articles_sibling['next']['title'] = $articles_sibling['next']['title']; |
91 | 91 | } |
92 | 92 | } |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | |
99 | 99 | $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
100 | 100 | if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) { |
101 | -} else { |
|
101 | +}else { |
|
102 | 102 | $xoopsTpl->assign('canrate', 1); |
103 | 103 | } |
104 | 104 | |
105 | -if ($transferbar = @include XOOPS_ROOT_PATH . '/Frameworks/transfer/bar.transfer.php') { |
|
105 | +if ($transferbar = @include XOOPS_ROOT_PATH.'/Frameworks/transfer/bar.transfer.php') { |
|
106 | 106 | $xoopsTpl->assign('transfer', $transferbar); |
107 | 107 | } |
108 | 108 | |
@@ -112,6 +112,6 @@ discard block |
||
112 | 112 | // for comment and notification |
113 | 113 | //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php"; |
114 | 114 | $_GET['article'] = $article_id; |
115 | -include XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
115 | +include XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
116 | 116 | |
117 | -require_once __DIR__ . '/footer.php'; |
|
117 | +require_once __DIR__.'/footer.php'; |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | include __DIR__ . '/header.php'; |
31 | 31 | |
32 | 32 | if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
33 | - $args['article'] = @$args_num[0]; |
|
34 | - $args['type'] = @$args_str[0]; |
|
33 | + $args['article'] = @$args_num[0]; |
|
34 | + $args['type'] = @$args_str[0]; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /* Specified Article */ |
@@ -48,14 +48,14 @@ discard block |
||
48 | 48 | |
49 | 49 | $valid_format = array('RSS0.91', 'RSS1.0', 'RSS2.0', 'PIE0.1', 'MBOX', 'OPML', 'ATOM', 'ATOM0.3', 'HTML', 'JS'); |
50 | 50 | if ($type === 'RDF') { |
51 | - $type = 'RSS1.0'; |
|
51 | + $type = 'RSS1.0'; |
|
52 | 52 | } |
53 | 53 | if ($type === 'RSS') { |
54 | - $type = 'RSS0.91'; |
|
54 | + $type = 'RSS0.91'; |
|
55 | 55 | } |
56 | 56 | if (empty($type) || !in_array($type, $valid_format)) { |
57 | - PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
58 | - exit(); |
|
57 | + PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
58 | + exit(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']); |
@@ -64,30 +64,30 @@ discard block |
||
64 | 64 | $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
65 | 65 | |
66 | 66 | if (!empty($article_id)) { |
67 | - $article_obj = $articleHandler->get($article_id); |
|
68 | - if (!$article_obj->getVar('art_id')) { |
|
69 | - PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED')); |
|
70 | - exit(); |
|
71 | - } |
|
72 | - $source = 'article'; |
|
67 | + $article_obj = $articleHandler->get($article_id); |
|
68 | + if (!$article_obj->getVar('art_id')) { |
|
69 | + PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED')); |
|
70 | + exit(); |
|
71 | + } |
|
72 | + $source = 'article'; |
|
73 | 73 | } elseif (!empty($blog_id)) { |
74 | - $blog_obj = $blogHandler->get($blog_id); |
|
75 | - if (!$blog_obj->getVar('blog_id')) { |
|
76 | - PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
77 | - exit(); |
|
78 | - } |
|
79 | - $source = 'blog'; |
|
74 | + $blog_obj = $blogHandler->get($blog_id); |
|
75 | + if (!$blog_obj->getVar('blog_id')) { |
|
76 | + PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
77 | + exit(); |
|
78 | + } |
|
79 | + $source = 'blog'; |
|
80 | 80 | } elseif (!empty($category_id)) { |
81 | - $source = 'category'; |
|
82 | - $category_obj = $categoryHandler->get($category_id); |
|
83 | - if (!$category_obj->getVar('cat_id')) { |
|
84 | - PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
85 | - exit(); |
|
86 | - } |
|
81 | + $source = 'category'; |
|
82 | + $category_obj = $categoryHandler->get($category_id); |
|
83 | + if (!$category_obj->getVar('cat_id')) { |
|
84 | + PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID')); |
|
85 | + exit(); |
|
86 | + } |
|
87 | 87 | } elseif (!empty($uid)) { |
88 | - $source = 'bookmark'; |
|
88 | + $source = 'bookmark'; |
|
89 | 89 | } else { |
90 | - $source = ''; |
|
90 | + $source = ''; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | $xml_charset = 'UTF-8'; |
@@ -97,102 +97,102 @@ discard block |
||
97 | 97 | $tpl->xoops_setCacheTime(3600); |
98 | 98 | $xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type); |
99 | 99 | if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) { |
100 | - $criteria = new CriteriaCompo(); |
|
101 | - $criteria->setLimit($xoopsModuleConfig['articles_perpage']); |
|
102 | - $articles_obj = array(); |
|
103 | - switch ($source) { |
|
104 | - case 'article': |
|
105 | - $pagetitle = planet_constant('MD_ARTICLE'); |
|
106 | - $rssdesc = planet_constant('MD_XMLDESC_ARTICLE'); |
|
107 | - |
|
108 | - $articles_obj[$article_id] = $article_obj; |
|
109 | - |
|
110 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
111 | - break; |
|
112 | - |
|
113 | - case 'category': |
|
114 | - $pagetitle = planet_constant('MD_CATEGORY'); |
|
115 | - $rssdesc = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title')); |
|
116 | - |
|
117 | - $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
118 | - $articles_obj = $articleHandler->getByCategory($criteria); |
|
119 | - |
|
120 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id; |
|
121 | - break; |
|
122 | - |
|
123 | - case 'blog': |
|
124 | - $pagetitle = planet_constant('MD_BLOG'); |
|
125 | - $rssdesc = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title')); |
|
126 | - |
|
127 | - $criteria->add(new Criteria('blog_id', $blog_id)); |
|
128 | - $articles_obj = $articleHandler->getAll($criteria); |
|
129 | - |
|
130 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id; |
|
131 | - break; |
|
132 | - |
|
133 | - case 'bookmark': |
|
134 | - $author_name = XoopsUser::getUnameFromId($uid); |
|
135 | - $pagetitle = planet_constant('MD_BOOKMARKS'); |
|
136 | - $rssdesc = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name); |
|
137 | - |
|
138 | - $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
139 | - $articles_obj = $articleHandler->getByBookmark($criteria); |
|
140 | - |
|
141 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid; |
|
142 | - |
|
143 | - break; |
|
144 | - |
|
145 | - default: |
|
146 | - $pagetitle = planet_constant('MD_INDEX'); |
|
147 | - $rssdesc = planet_constant('MD_XMLDESC_INDEX'); |
|
148 | - |
|
149 | - $articles_obj = $articleHandler->getAll($criteria); |
|
150 | - |
|
151 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
152 | - break; |
|
153 | - } |
|
154 | - $items = array(); |
|
155 | - foreach (array_keys($articles_obj) as $id) { |
|
156 | - $content = $articles_obj[$id]->getVar('art_content'); |
|
157 | - $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author'); |
|
158 | - $items[] = array( |
|
159 | - 'title' => $articles_obj[$id]->getVar('art_title'), |
|
160 | - 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'), |
|
161 | - 'description' => $content, |
|
162 | - 'descriptionHtmlSyndicated' => true, |
|
163 | - 'date' => $articles_obj[$id]->getTime('rss'), |
|
164 | - 'source' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
165 | - 'author' => $articles_obj[$id]->getVar('art_author') |
|
166 | - ); |
|
167 | - } |
|
168 | - unset($articles_obj, $criteria); |
|
169 | - |
|
170 | - $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']); |
|
171 | - $xml = $xmlHandler->create($type); |
|
172 | - $xml->setVar('encoding', $xml_charset); |
|
173 | - $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true); |
|
174 | - $xml->setVar('description', $rssdesc, true); |
|
175 | - $xml->setVar('descriptionHtmlSyndicated', true); |
|
176 | - $xml->setVar('link', $xml_link); |
|
177 | - $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true); |
|
178 | - $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true)); |
|
179 | - $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true)); |
|
180 | - $xml->setVar('category', $xoopsModule->getVar('name'), true); |
|
181 | - $xml->setVar('generator', $xoopsModule->getInfo('version')); |
|
182 | - $xml->setVar('language', _LANGCODE); |
|
183 | - |
|
184 | - $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image')); |
|
185 | - $image = array( |
|
186 | - 'width' => $dimention[0], |
|
187 | - 'height' => $dimention[1], |
|
188 | - 'title' => $xoopsConfig['sitename'] . ' :: ' . $pagetitle, |
|
189 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'), |
|
190 | - 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
191 | - 'description' => $rssdesc |
|
192 | - ); |
|
193 | - $xml->setImage($image); |
|
194 | - |
|
195 | - /* |
|
100 | + $criteria = new CriteriaCompo(); |
|
101 | + $criteria->setLimit($xoopsModuleConfig['articles_perpage']); |
|
102 | + $articles_obj = array(); |
|
103 | + switch ($source) { |
|
104 | + case 'article': |
|
105 | + $pagetitle = planet_constant('MD_ARTICLE'); |
|
106 | + $rssdesc = planet_constant('MD_XMLDESC_ARTICLE'); |
|
107 | + |
|
108 | + $articles_obj[$article_id] = $article_obj; |
|
109 | + |
|
110 | + $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
111 | + break; |
|
112 | + |
|
113 | + case 'category': |
|
114 | + $pagetitle = planet_constant('MD_CATEGORY'); |
|
115 | + $rssdesc = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title')); |
|
116 | + |
|
117 | + $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
118 | + $articles_obj = $articleHandler->getByCategory($criteria); |
|
119 | + |
|
120 | + $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id; |
|
121 | + break; |
|
122 | + |
|
123 | + case 'blog': |
|
124 | + $pagetitle = planet_constant('MD_BLOG'); |
|
125 | + $rssdesc = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title')); |
|
126 | + |
|
127 | + $criteria->add(new Criteria('blog_id', $blog_id)); |
|
128 | + $articles_obj = $articleHandler->getAll($criteria); |
|
129 | + |
|
130 | + $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id; |
|
131 | + break; |
|
132 | + |
|
133 | + case 'bookmark': |
|
134 | + $author_name = XoopsUser::getUnameFromId($uid); |
|
135 | + $pagetitle = planet_constant('MD_BOOKMARKS'); |
|
136 | + $rssdesc = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name); |
|
137 | + |
|
138 | + $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
139 | + $articles_obj = $articleHandler->getByBookmark($criteria); |
|
140 | + |
|
141 | + $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid; |
|
142 | + |
|
143 | + break; |
|
144 | + |
|
145 | + default: |
|
146 | + $pagetitle = planet_constant('MD_INDEX'); |
|
147 | + $rssdesc = planet_constant('MD_XMLDESC_INDEX'); |
|
148 | + |
|
149 | + $articles_obj = $articleHandler->getAll($criteria); |
|
150 | + |
|
151 | + $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
152 | + break; |
|
153 | + } |
|
154 | + $items = array(); |
|
155 | + foreach (array_keys($articles_obj) as $id) { |
|
156 | + $content = $articles_obj[$id]->getVar('art_content'); |
|
157 | + $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author'); |
|
158 | + $items[] = array( |
|
159 | + 'title' => $articles_obj[$id]->getVar('art_title'), |
|
160 | + 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'), |
|
161 | + 'description' => $content, |
|
162 | + 'descriptionHtmlSyndicated' => true, |
|
163 | + 'date' => $articles_obj[$id]->getTime('rss'), |
|
164 | + 'source' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
165 | + 'author' => $articles_obj[$id]->getVar('art_author') |
|
166 | + ); |
|
167 | + } |
|
168 | + unset($articles_obj, $criteria); |
|
169 | + |
|
170 | + $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']); |
|
171 | + $xml = $xmlHandler->create($type); |
|
172 | + $xml->setVar('encoding', $xml_charset); |
|
173 | + $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true); |
|
174 | + $xml->setVar('description', $rssdesc, true); |
|
175 | + $xml->setVar('descriptionHtmlSyndicated', true); |
|
176 | + $xml->setVar('link', $xml_link); |
|
177 | + $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true); |
|
178 | + $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true)); |
|
179 | + $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true)); |
|
180 | + $xml->setVar('category', $xoopsModule->getVar('name'), true); |
|
181 | + $xml->setVar('generator', $xoopsModule->getInfo('version')); |
|
182 | + $xml->setVar('language', _LANGCODE); |
|
183 | + |
|
184 | + $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image')); |
|
185 | + $image = array( |
|
186 | + 'width' => $dimention[0], |
|
187 | + 'height' => $dimention[1], |
|
188 | + 'title' => $xoopsConfig['sitename'] . ' :: ' . $pagetitle, |
|
189 | + 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'), |
|
190 | + 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
191 | + 'description' => $rssdesc |
|
192 | + ); |
|
193 | + $xml->setImage($image); |
|
194 | + |
|
195 | + /* |
|
196 | 196 | $item = array( |
197 | 197 | "title" => $datatitle, |
198 | 198 | "link" => $dataurl, |
@@ -203,11 +203,11 @@ discard block |
||
203 | 203 | "author" => $dataauthor |
204 | 204 | ); |
205 | 205 | */ |
206 | - $xml->addItems($items); |
|
206 | + $xml->addItems($items); |
|
207 | 207 | |
208 | - $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp'); |
|
208 | + $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp'); |
|
209 | 209 | |
210 | - $tpl->assign_by_ref('dummy_content', $dummy_content); |
|
210 | + $tpl->assign_by_ref('dummy_content', $dummy_content); |
|
211 | 211 | } |
212 | 212 | //$content = ob_get_contents(); |
213 | 213 | ob_end_clean(); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | use Xmf\Request; |
28 | 28 | |
29 | 29 | ob_start(); |
30 | -include __DIR__ . '/header.php'; |
|
30 | +include __DIR__.'/header.php'; |
|
31 | 31 | |
32 | 32 | if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
33 | 33 | $args['article'] = @$args_num[0]; |
@@ -86,16 +86,16 @@ discard block |
||
86 | 86 | } |
87 | 87 | } elseif (!empty($uid)) { |
88 | 88 | $source = 'bookmark'; |
89 | -} else { |
|
89 | +}else { |
|
90 | 90 | $source = ''; |
91 | 91 | } |
92 | 92 | |
93 | 93 | $xml_charset = 'UTF-8'; |
94 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
94 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
95 | 95 | $tpl = new XoopsTpl(); |
96 | 96 | $tpl->xoops_setCaching(2); |
97 | 97 | $tpl->xoops_setCacheTime(3600); |
98 | -$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type); |
|
98 | +$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid').','.$article_id.','.$category_id.','.$blog_id.','.$uid.','.$type); |
|
99 | 99 | if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) { |
100 | 100 | $criteria = new CriteriaCompo(); |
101 | 101 | $criteria->setLimit($xoopsModuleConfig['articles_perpage']); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $articles_obj[$article_id] = $article_obj; |
109 | 109 | |
110 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
110 | + $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id'); |
|
111 | 111 | break; |
112 | 112 | |
113 | 113 | case 'category': |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $criteria->add(new Criteria('bc.cat_id', $category_id)); |
118 | 118 | $articles_obj = $articleHandler->getByCategory($criteria); |
119 | 119 | |
120 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id; |
|
120 | + $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'c'.$category_id; |
|
121 | 121 | break; |
122 | 122 | |
123 | 123 | case 'blog': |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $criteria->add(new Criteria('blog_id', $blog_id)); |
128 | 128 | $articles_obj = $articleHandler->getAll($criteria); |
129 | 129 | |
130 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id; |
|
130 | + $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id; |
|
131 | 131 | break; |
132 | 132 | |
133 | 133 | case 'bookmark': |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $criteria->add(new Criteria('bm.bm_uid', $uid)); |
139 | 139 | $articles_obj = $articleHandler->getByBookmark($criteria); |
140 | 140 | |
141 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid; |
|
141 | + $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$uid; |
|
142 | 142 | |
143 | 143 | break; |
144 | 144 | |
@@ -148,20 +148,20 @@ discard block |
||
148 | 148 | |
149 | 149 | $articles_obj = $articleHandler->getAll($criteria); |
150 | 150 | |
151 | - $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
151 | + $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
152 | 152 | break; |
153 | 153 | } |
154 | 154 | $items = array(); |
155 | 155 | foreach (array_keys($articles_obj) as $id) { |
156 | 156 | $content = $articles_obj[$id]->getVar('art_content'); |
157 | - $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author'); |
|
157 | + $content .= '<br>'.planet_constant('MD_SOURCE').': '.$articles_obj[$id]->getVar('art_link').' '.$articles_obj[$id]->getVar('art_author'); |
|
158 | 158 | $items[] = array( |
159 | 159 | 'title' => $articles_obj[$id]->getVar('art_title'), |
160 | - 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'), |
|
160 | + 'link' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_obj[$id]->getVar('art_id'), |
|
161 | 161 | 'description' => $content, |
162 | 162 | 'descriptionHtmlSyndicated' => true, |
163 | 163 | 'date' => $articles_obj[$id]->getTime('rss'), |
164 | - 'source' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
164 | + 'source' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/', |
|
165 | 165 | 'author' => $articles_obj[$id]->getVar('art_author') |
166 | 166 | ); |
167 | 167 | } |
@@ -170,24 +170,24 @@ discard block |
||
170 | 170 | $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']); |
171 | 171 | $xml = $xmlHandler->create($type); |
172 | 172 | $xml->setVar('encoding', $xml_charset); |
173 | - $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true); |
|
173 | + $xml->setVar('title', $xoopsConfig['sitename'].' :: '.$pagetitle, 'UTF-8', $xml_charset, true); |
|
174 | 174 | $xml->setVar('description', $rssdesc, true); |
175 | 175 | $xml->setVar('descriptionHtmlSyndicated', true); |
176 | 176 | $xml->setVar('link', $xml_link); |
177 | - $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true); |
|
177 | + $xml->setVar('syndicationURL', XOOPS_URL.'/'.xoops_getenv('PHP_SELF'), 'post', true); |
|
178 | 178 | $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true)); |
179 | 179 | $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true)); |
180 | 180 | $xml->setVar('category', $xoopsModule->getVar('name'), true); |
181 | 181 | $xml->setVar('generator', $xoopsModule->getInfo('version')); |
182 | 182 | $xml->setVar('language', _LANGCODE); |
183 | 183 | |
184 | - $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image')); |
|
184 | + $dimention = @getimagesize(XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image')); |
|
185 | 185 | $image = array( |
186 | 186 | 'width' => $dimention[0], |
187 | 187 | 'height' => $dimention[1], |
188 | - 'title' => $xoopsConfig['sitename'] . ' :: ' . $pagetitle, |
|
189 | - 'url' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'), |
|
190 | - 'link' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/', |
|
188 | + 'title' => $xoopsConfig['sitename'].' :: '.$pagetitle, |
|
189 | + 'url' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image'), |
|
190 | + 'link' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/', |
|
191 | 191 | 'description' => $rssdesc |
192 | 192 | ); |
193 | 193 | $xml->setImage($image); |
@@ -205,11 +205,11 @@ discard block |
||
205 | 205 | */ |
206 | 206 | $xml->addItems($items); |
207 | 207 | |
208 | - $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp'); |
|
208 | + $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH.'/'.$GLOBALS['moddirname'].'.xml.tmp'); |
|
209 | 209 | |
210 | 210 | $tpl->assign_by_ref('dummy_content', $dummy_content); |
211 | 211 | } |
212 | 212 | //$content = ob_get_contents(); |
213 | 213 | ob_end_clean(); |
214 | -header('Content-Type:text/xml; charset=' . $xml_charset); |
|
214 | +header('Content-Type:text/xml; charset='.$xml_charset); |
|
215 | 215 | $tpl->display('db:system_dummy.tpl', $xoopsCachedTemplateId); |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | include __DIR__ . '/header.php'; |
28 | 28 | |
29 | 29 | if (preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)) { |
30 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
31 | - exit(); |
|
30 | + include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
31 | + exit(); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if ($REQUEST_URI_parsed = PlanetUtility::planetParseArguments($args_num, $args, $args_str)) { |
35 | - $args['start'] = @$args_num[0]; |
|
36 | - $args['sort'] = @$args_str[0]; |
|
35 | + $args['start'] = @$args_num[0]; |
|
36 | + $args['sort'] = @$args_str[0]; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /* Start */ |
@@ -51,20 +51,20 @@ discard block |
||
51 | 51 | |
52 | 52 | // restore $_SERVER['REQUEST_URI'] |
53 | 53 | if (!empty($REQUEST_URI_parsed)) { |
54 | - $args_REQUEST_URI = array(); |
|
55 | - $_args = array('start', 'sort', 'uid', 'list'); |
|
56 | - foreach ($_args as $arg) { |
|
57 | - if (!empty(${$arg})) { |
|
58 | - $args_REQUEST_URI[] = $arg . '=' . ${$arg}; |
|
59 | - } |
|
60 | - } |
|
61 | - if (!empty($blog_id)) { |
|
62 | - $args_REQUEST_URI[] = 'blog=' . $blog_id; |
|
63 | - } |
|
64 | - if (!empty($category_id)) { |
|
65 | - $args_REQUEST_URI[] = 'category=' . $category_id; |
|
66 | - } |
|
67 | - $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI)); |
|
54 | + $args_REQUEST_URI = array(); |
|
55 | + $_args = array('start', 'sort', 'uid', 'list'); |
|
56 | + foreach ($_args as $arg) { |
|
57 | + if (!empty(${$arg})) { |
|
58 | + $args_REQUEST_URI[] = $arg . '=' . ${$arg}; |
|
59 | + } |
|
60 | + } |
|
61 | + if (!empty($blog_id)) { |
|
62 | + $args_REQUEST_URI[] = 'blog=' . $blog_id; |
|
63 | + } |
|
64 | + if (!empty($category_id)) { |
|
65 | + $args_REQUEST_URI[] = 'category=' . $category_id; |
|
66 | + } |
|
67 | + $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI)); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $GLOBALS['xoopsOption']['template_main'] = PlanetUtility::planetGetTemplate('index'); |
@@ -89,73 +89,73 @@ discard block |
||
89 | 89 | $article_prefix = ''; |
90 | 90 | /* Specific category */ |
91 | 91 | if ($category_id > 0) { |
92 | - $category_obj = $categoryHandler->get($category_id); |
|
93 | - $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
94 | - $uid = 0; |
|
95 | - $blog_id = 0; |
|
96 | - $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title')); |
|
97 | - $query_type = 'category'; |
|
98 | - $article_prefix = 'a.'; |
|
92 | + $category_obj = $categoryHandler->get($category_id); |
|
93 | + $criteria->add(new Criteria('bc.cat_id', $category_id)); |
|
94 | + $uid = 0; |
|
95 | + $blog_id = 0; |
|
96 | + $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title')); |
|
97 | + $query_type = 'category'; |
|
98 | + $article_prefix = 'a.'; |
|
99 | 99 | } |
100 | 100 | /* Specific blog */ |
101 | 101 | if ($blog_id > 0) { |
102 | - $blog_obj = $blogHandler->get($blog_id); |
|
103 | - if ($blog_obj->getVar('blog_status') |
|
104 | - || (is_object($xoopsUser) |
|
105 | - && $xoopsUser->getVar('uid') == $blog_obj->getVar('blog_submitter'))) { |
|
106 | - $criteria->add(new Criteria('blog_id', $blog_id)); |
|
107 | - $category_id = 0; |
|
108 | - $uid = 0; |
|
109 | - $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
110 | - $blog_data = array( |
|
111 | - 'id' => $blog_id, |
|
112 | - 'title' => $blog_obj->getVar('blog_title'), |
|
113 | - 'image' => $blog_obj->getImage(), |
|
114 | - 'title' => $blog_obj->getVar('blog_title'), |
|
115 | - 'feed' => $blog_obj->getVar('blog_feed'), |
|
116 | - 'link' => $blog_obj->getVar('blog_link'), |
|
117 | - 'desc' => $blog_obj->getVar('blog_desc'), |
|
118 | - 'time' => $blog_obj->getTime(), |
|
119 | - 'star' => $blog_obj->getStar(), |
|
120 | - 'rates' => $blog_obj->getVar('blog_rates'), |
|
121 | - 'marks' => $blog_obj->getVar('blog_marks') |
|
122 | - ); |
|
123 | - } |
|
124 | - $query_type = 'blog'; |
|
125 | - $article_prefix = ''; |
|
102 | + $blog_obj = $blogHandler->get($blog_id); |
|
103 | + if ($blog_obj->getVar('blog_status') |
|
104 | + || (is_object($xoopsUser) |
|
105 | + && $xoopsUser->getVar('uid') == $blog_obj->getVar('blog_submitter'))) { |
|
106 | + $criteria->add(new Criteria('blog_id', $blog_id)); |
|
107 | + $category_id = 0; |
|
108 | + $uid = 0; |
|
109 | + $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
110 | + $blog_data = array( |
|
111 | + 'id' => $blog_id, |
|
112 | + 'title' => $blog_obj->getVar('blog_title'), |
|
113 | + 'image' => $blog_obj->getImage(), |
|
114 | + 'title' => $blog_obj->getVar('blog_title'), |
|
115 | + 'feed' => $blog_obj->getVar('blog_feed'), |
|
116 | + 'link' => $blog_obj->getVar('blog_link'), |
|
117 | + 'desc' => $blog_obj->getVar('blog_desc'), |
|
118 | + 'time' => $blog_obj->getTime(), |
|
119 | + 'star' => $blog_obj->getStar(), |
|
120 | + 'rates' => $blog_obj->getVar('blog_rates'), |
|
121 | + 'marks' => $blog_obj->getVar('blog_marks') |
|
122 | + ); |
|
123 | + } |
|
124 | + $query_type = 'blog'; |
|
125 | + $article_prefix = ''; |
|
126 | 126 | } |
127 | 127 | /* User bookmarks(favorites) */ |
128 | 128 | if ($uid > 0) { |
129 | - $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
130 | - $category_id = 0; |
|
131 | - $blog_id = 0; |
|
132 | - $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
133 | - $user_data = array( |
|
134 | - 'uid' => $uid, |
|
135 | - 'name' => XoopsUser::getUnameFromId($uid), |
|
136 | - 'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid)) |
|
137 | - ); |
|
138 | - $query_type = 'bookmark'; |
|
139 | - $article_prefix = 'a.'; |
|
129 | + $criteria->add(new Criteria('bm.bm_uid', $uid)); |
|
130 | + $category_id = 0; |
|
131 | + $blog_id = 0; |
|
132 | + $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']); |
|
133 | + $user_data = array( |
|
134 | + 'uid' => $uid, |
|
135 | + 'name' => XoopsUser::getUnameFromId($uid), |
|
136 | + 'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid)) |
|
137 | + ); |
|
138 | + $query_type = 'bookmark'; |
|
139 | + $article_prefix = 'a.'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /* Sort */ |
143 | 143 | $order = 'DESC'; |
144 | 144 | $sort = empty($sort) ? 'time' : $sort; |
145 | 145 | switch ($sort) { |
146 | - case 'views': |
|
147 | - $sortby = $article_prefix . 'art_views'; |
|
148 | - break; |
|
149 | - case 'rating': |
|
150 | - $sortby = $article_prefix . 'art_rating'; |
|
151 | - break; |
|
152 | - case 'time': |
|
153 | - $sortby = $article_prefix . 'art_time'; |
|
154 | - break; |
|
155 | - case 'default': |
|
156 | - default: |
|
157 | - $sortby = ''; |
|
158 | - break; |
|
146 | + case 'views': |
|
147 | + $sortby = $article_prefix . 'art_views'; |
|
148 | + break; |
|
149 | + case 'rating': |
|
150 | + $sortby = $article_prefix . 'art_rating'; |
|
151 | + break; |
|
152 | + case 'time': |
|
153 | + $sortby = $article_prefix . 'art_time'; |
|
154 | + break; |
|
155 | + case 'default': |
|
156 | + default: |
|
157 | + $sortby = ''; |
|
158 | + break; |
|
159 | 159 | } |
160 | 160 | $criteria->setSort($sortby); |
161 | 161 | $criteria->setOrder($order); |
@@ -163,120 +163,120 @@ discard block |
||
163 | 163 | $criteria->setLimit($limit); |
164 | 164 | |
165 | 165 | $tags = empty($list) ? '' : array( |
166 | - $article_prefix . 'art_title', |
|
167 | - $article_prefix . 'blog_id', |
|
168 | - $article_prefix . 'art_time' |
|
166 | + $article_prefix . 'art_title', |
|
167 | + $article_prefix . 'blog_id', |
|
168 | + $article_prefix . 'art_time' |
|
169 | 169 | ); |
170 | 170 | switch ($query_type) { |
171 | - case 'category': |
|
172 | - $articles_obj = $articleHandler->getByCategory($criteria, $tags); |
|
173 | - $count_article = $articleHandler->getCountByCategory($criteria); |
|
174 | - break; |
|
175 | - case 'bookmark': |
|
176 | - $articles_obj = $articleHandler->getByBookmark($criteria, $tags); |
|
177 | - $count_article = $articleHandler->getCountByBookmark($criteria); |
|
178 | - break; |
|
179 | - default: |
|
180 | - $articles_obj = $articleHandler->getAll($criteria, $tags); |
|
181 | - $count_article = $articleHandler->getCount($criteria); |
|
182 | - break; |
|
171 | + case 'category': |
|
172 | + $articles_obj = $articleHandler->getByCategory($criteria, $tags); |
|
173 | + $count_article = $articleHandler->getCountByCategory($criteria); |
|
174 | + break; |
|
175 | + case 'bookmark': |
|
176 | + $articles_obj = $articleHandler->getByBookmark($criteria, $tags); |
|
177 | + $count_article = $articleHandler->getCountByBookmark($criteria); |
|
178 | + break; |
|
179 | + default: |
|
180 | + $articles_obj = $articleHandler->getAll($criteria, $tags); |
|
181 | + $count_article = $articleHandler->getCount($criteria); |
|
182 | + break; |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | if (!empty($blog_data)) { |
186 | - $blogs[$blog_data['id']] = $blog_data['title']; |
|
186 | + $blogs[$blog_data['id']] = $blog_data['title']; |
|
187 | 187 | } else { |
188 | - $blog_array = array(); |
|
189 | - foreach (array_keys($articles_obj) as $id) { |
|
190 | - $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1; |
|
191 | - } |
|
192 | - $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN'); |
|
193 | - $blogs = $blogHandler->getList($criteria_blog); |
|
188 | + $blog_array = array(); |
|
189 | + foreach (array_keys($articles_obj) as $id) { |
|
190 | + $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1; |
|
191 | + } |
|
192 | + $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN'); |
|
193 | + $blogs = $blogHandler->getList($criteria_blog); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /* Objects to array */ |
197 | 197 | $articles = array(); |
198 | 198 | foreach (array_keys($articles_obj) as $id) { |
199 | - $_article = array( |
|
200 | - 'id' => $id, |
|
201 | - 'title' => $articles_obj[$id]->getVar('art_title'), |
|
202 | - 'time' => $articles_obj[$id]->getTime(), |
|
203 | - 'blog' => array( |
|
204 | - 'id' => $articles_obj[$id]->getVar('blog_id'), |
|
205 | - 'title' => $blogs[$articles_obj[$id]->getVar('blog_id')] |
|
206 | - ) |
|
207 | - ); |
|
208 | - if (empty($list)) { |
|
209 | - $_article = array_merge($_article, array( |
|
210 | - 'author' => $articles_obj[$id]->getVar('art_author'), |
|
211 | - 'views' => $articles_obj[$id]->getVar('art_views'), |
|
212 | - 'comments' => $articles_obj[$id]->getVar('art_comments'), |
|
213 | - 'star' => $articles_obj[$id]->getStar(), |
|
214 | - 'rates' => $articles_obj[$id]->getVar('art_rates') |
|
215 | - )); |
|
216 | - if (!empty($xoopsModuleConfig['display_summary'])) { |
|
217 | - $_article['content'] = $articles_obj[$id]->getSummary(); |
|
218 | - } else { |
|
219 | - $_article['content'] = $articles_obj[$id]->getVar('art_content'); |
|
220 | - } |
|
221 | - } |
|
222 | - $articles[] = $_article; |
|
223 | - unset($_article); |
|
199 | + $_article = array( |
|
200 | + 'id' => $id, |
|
201 | + 'title' => $articles_obj[$id]->getVar('art_title'), |
|
202 | + 'time' => $articles_obj[$id]->getTime(), |
|
203 | + 'blog' => array( |
|
204 | + 'id' => $articles_obj[$id]->getVar('blog_id'), |
|
205 | + 'title' => $blogs[$articles_obj[$id]->getVar('blog_id')] |
|
206 | + ) |
|
207 | + ); |
|
208 | + if (empty($list)) { |
|
209 | + $_article = array_merge($_article, array( |
|
210 | + 'author' => $articles_obj[$id]->getVar('art_author'), |
|
211 | + 'views' => $articles_obj[$id]->getVar('art_views'), |
|
212 | + 'comments' => $articles_obj[$id]->getVar('art_comments'), |
|
213 | + 'star' => $articles_obj[$id]->getStar(), |
|
214 | + 'rates' => $articles_obj[$id]->getVar('art_rates') |
|
215 | + )); |
|
216 | + if (!empty($xoopsModuleConfig['display_summary'])) { |
|
217 | + $_article['content'] = $articles_obj[$id]->getSummary(); |
|
218 | + } else { |
|
219 | + $_article['content'] = $articles_obj[$id]->getVar('art_content'); |
|
220 | + } |
|
221 | + } |
|
222 | + $articles[] = $_article; |
|
223 | + unset($_article); |
|
224 | 224 | } |
225 | 225 | unset($articles_obj); |
226 | 226 | |
227 | 227 | if ($count_article > $limit) { |
228 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
229 | - $start_link = array(); |
|
230 | - if ($sort) { |
|
231 | - $start_link[] = 'sort=' . $sort; |
|
232 | - } |
|
233 | - if ($category_id) { |
|
234 | - $start_link[] = 'category=' . $category_id; |
|
235 | - } |
|
236 | - if ($blog_id) { |
|
237 | - $start_link[] = 'blog=' . $blog_id; |
|
238 | - } |
|
239 | - if ($list) { |
|
240 | - $start_link[] = 'list=' . $list; |
|
241 | - } |
|
242 | - $nav = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&', $start_link)); |
|
243 | - $pagenav = $nav->renderNav(4); |
|
228 | + include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
229 | + $start_link = array(); |
|
230 | + if ($sort) { |
|
231 | + $start_link[] = 'sort=' . $sort; |
|
232 | + } |
|
233 | + if ($category_id) { |
|
234 | + $start_link[] = 'category=' . $category_id; |
|
235 | + } |
|
236 | + if ($blog_id) { |
|
237 | + $start_link[] = 'blog=' . $blog_id; |
|
238 | + } |
|
239 | + if ($list) { |
|
240 | + $start_link[] = 'list=' . $list; |
|
241 | + } |
|
242 | + $nav = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&', $start_link)); |
|
243 | + $pagenav = $nav->renderNav(4); |
|
244 | 244 | } else { |
245 | - $pagenav = ''; |
|
245 | + $pagenav = ''; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | $xoopsTpl->assign('xoops_module_header', $xoops_module_header); |
249 | 249 | $xoopsTpl->assign('dirname', $GLOBALS['moddirname']); |
250 | 250 | |
251 | 251 | if ($category_id || $blog_id || $uid) { |
252 | - $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
252 | + $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | $link_switch = "<a href=\"" |
256 | - . XOOPS_URL |
|
257 | - . '/modules/' |
|
258 | - . $GLOBALS['moddirname'] |
|
259 | - . '/index.php' |
|
260 | - . (empty($category_id) ? '' : '/c' . $category_id) |
|
261 | - . (empty($uid) ? '' : '/u' . $uid) |
|
262 | - . (empty($blog_id) ? '' : '/b' . $blog_id) |
|
263 | - . (empty($list) ? '/l1' : '') |
|
264 | - . "\" title=\"" |
|
265 | - . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
266 | - . "\">" |
|
267 | - . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
268 | - . '</a>'; |
|
256 | + . XOOPS_URL |
|
257 | + . '/modules/' |
|
258 | + . $GLOBALS['moddirname'] |
|
259 | + . '/index.php' |
|
260 | + . (empty($category_id) ? '' : '/c' . $category_id) |
|
261 | + . (empty($uid) ? '' : '/u' . $uid) |
|
262 | + . (empty($blog_id) ? '' : '/b' . $blog_id) |
|
263 | + . (empty($list) ? '/l1' : '') |
|
264 | + . "\" title=\"" |
|
265 | + . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
266 | + . "\">" |
|
267 | + . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
|
268 | + . '</a>'; |
|
269 | 269 | $xoopsTpl->assign('link_switch', $link_switch); |
270 | 270 | |
271 | 271 | $link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>'; |
272 | 272 | $xoopsTpl->assign('link_blogs', $link_blogs); |
273 | 273 | |
274 | 274 | if (empty($uid) && is_object($xoopsUser)) { |
275 | - $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
275 | + $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) { |
279 | - $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
279 | + $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | $xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES')); |
@@ -290,22 +290,22 @@ discard block |
||
290 | 290 | $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
291 | 291 | if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) { |
292 | 292 | } elseif ($blog_id > 0) { |
293 | - $xoopsTpl->assign('canrate', 1); |
|
293 | + $xoopsTpl->assign('canrate', 1); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | $sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1'); |
297 | 297 | $valid_sorts = array( |
298 | - 'views' => planet_constant('MD_VIEWS'), |
|
299 | - 'rating' => planet_constant('MD_RATING'), |
|
300 | - 'time' => planet_constant('MD_TIME'), |
|
301 | - 'default' => planet_constant('MD_DEFAULT') |
|
298 | + 'views' => planet_constant('MD_VIEWS'), |
|
299 | + 'rating' => planet_constant('MD_RATING'), |
|
300 | + 'time' => planet_constant('MD_TIME'), |
|
301 | + 'default' => planet_constant('MD_DEFAULT') |
|
302 | 302 | ); |
303 | 303 | $sortlinks = array(); |
304 | 304 | foreach ($valid_sorts as $val => $name) { |
305 | - if ($val == $sort) { |
|
306 | - continue; |
|
307 | - } |
|
308 | - $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>'; |
|
305 | + if ($val == $sort) { |
|
306 | + continue; |
|
307 | + } |
|
308 | + $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>'; |
|
309 | 309 | } |
310 | 310 | $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks)); |
311 | 311 | $xoopsTpl->assign('version', $xoopsModule->getVar('version')); |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | |
315 | 315 | // for notification |
316 | 316 | if (!empty($blog_id)) { |
317 | - //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php"; |
|
318 | - $_GET['blog'] = $blog_id; |
|
317 | + //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php"; |
|
318 | + $_GET['blog'] = $blog_id; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | require_once __DIR__ . '/footer.php'; |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | // URL: https://xoops.org // |
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | -include __DIR__ . '/header.php'; |
|
27 | +include __DIR__.'/header.php'; |
|
28 | 28 | |
29 | 29 | if (preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)) { |
30 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
30 | + include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
|
31 | 31 | exit(); |
32 | 32 | } |
33 | 33 | |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | /* Start */ |
40 | -$start = (int)(empty($_GET['start']) ? @$args['start'] : $_GET['start']); |
|
40 | +$start = (int) (empty($_GET['start']) ? @$args['start'] : $_GET['start']); |
|
41 | 41 | /* Specified Category */ |
42 | -$category_id = (int)(empty($_GET['category']) ? @$args['category'] : $_GET['category']); |
|
42 | +$category_id = (int) (empty($_GET['category']) ? @$args['category'] : $_GET['category']); |
|
43 | 43 | /* Specified Blog */ |
44 | -$blog_id = (int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']); |
|
44 | +$blog_id = (int) (empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']); |
|
45 | 45 | /* Specified Bookmar(Favorite) UID */ |
46 | -$uid = (int)(empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']); |
|
46 | +$uid = (int) (empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']); |
|
47 | 47 | /* Sort by term */ |
48 | 48 | $sort = empty($_GET['sort']) ? @$args['sort'] : $_GET['sort']; |
49 | 49 | /* Display as list */ |
50 | -$list = (int)(empty($_GET['list']) ? @$args['list'] : $_GET['list']); |
|
50 | +$list = (int) (empty($_GET['list']) ? @$args['list'] : $_GET['list']); |
|
51 | 51 | |
52 | 52 | // restore $_SERVER['REQUEST_URI'] |
53 | 53 | if (!empty($REQUEST_URI_parsed)) { |
@@ -55,28 +55,28 @@ discard block |
||
55 | 55 | $_args = array('start', 'sort', 'uid', 'list'); |
56 | 56 | foreach ($_args as $arg) { |
57 | 57 | if (!empty(${$arg})) { |
58 | - $args_REQUEST_URI[] = $arg . '=' . ${$arg}; |
|
58 | + $args_REQUEST_URI[] = $arg.'='.${$arg}; |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | if (!empty($blog_id)) { |
62 | - $args_REQUEST_URI[] = 'blog=' . $blog_id; |
|
62 | + $args_REQUEST_URI[] = 'blog='.$blog_id; |
|
63 | 63 | } |
64 | 64 | if (!empty($category_id)) { |
65 | - $args_REQUEST_URI[] = 'category=' . $category_id; |
|
65 | + $args_REQUEST_URI[] = 'category='.$category_id; |
|
66 | 66 | } |
67 | - $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI)); |
|
67 | + $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($args_REQUEST_URI) ? '' : '?'.implode('&', $args_REQUEST_URI)); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $GLOBALS['xoopsOption']['template_main'] = PlanetUtility::planetGetTemplate('index'); |
71 | 71 | $xoops_module_header = ' |
72 | - <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rss" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rss/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '"> |
|
73 | - <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rdf" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rdf/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '"> |
|
74 | - <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name') . ' atom" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."atom/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '"> |
|
72 | + <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rss" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rss/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'"> |
|
73 | + <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rdf" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rdf/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'"> |
|
74 | + <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name').' atom" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."atom/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'"> |
|
75 | 75 | '; |
76 | 76 | |
77 | 77 | $xoopsOption['xoops_module_header'] = $xoops_module_header; |
78 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
79 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
78 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
79 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
80 | 80 | |
81 | 81 | // Following part will not be executed after cache |
82 | 82 | $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $criteria = new CriteriaCompo(); |
89 | 89 | $article_prefix = ''; |
90 | 90 | /* Specific category */ |
91 | -if ($category_id > 0) { |
|
91 | +if ($category_id>0) { |
|
92 | 92 | $category_obj = $categoryHandler->get($category_id); |
93 | 93 | $criteria->add(new Criteria('bc.cat_id', $category_id)); |
94 | 94 | $uid = 0; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $article_prefix = 'a.'; |
99 | 99 | } |
100 | 100 | /* Specific blog */ |
101 | -if ($blog_id > 0) { |
|
101 | +if ($blog_id>0) { |
|
102 | 102 | $blog_obj = $blogHandler->get($blog_id); |
103 | 103 | if ($blog_obj->getVar('blog_status') |
104 | 104 | || (is_object($xoopsUser) |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $article_prefix = ''; |
126 | 126 | } |
127 | 127 | /* User bookmarks(favorites) */ |
128 | -if ($uid > 0) { |
|
128 | +if ($uid>0) { |
|
129 | 129 | $criteria->add(new Criteria('bm.bm_uid', $uid)); |
130 | 130 | $category_id = 0; |
131 | 131 | $blog_id = 0; |
@@ -144,13 +144,13 @@ discard block |
||
144 | 144 | $sort = empty($sort) ? 'time' : $sort; |
145 | 145 | switch ($sort) { |
146 | 146 | case 'views': |
147 | - $sortby = $article_prefix . 'art_views'; |
|
147 | + $sortby = $article_prefix.'art_views'; |
|
148 | 148 | break; |
149 | 149 | case 'rating': |
150 | - $sortby = $article_prefix . 'art_rating'; |
|
150 | + $sortby = $article_prefix.'art_rating'; |
|
151 | 151 | break; |
152 | 152 | case 'time': |
153 | - $sortby = $article_prefix . 'art_time'; |
|
153 | + $sortby = $article_prefix.'art_time'; |
|
154 | 154 | break; |
155 | 155 | case 'default': |
156 | 156 | default: |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | $criteria->setLimit($limit); |
164 | 164 | |
165 | 165 | $tags = empty($list) ? '' : array( |
166 | - $article_prefix . 'art_title', |
|
167 | - $article_prefix . 'blog_id', |
|
168 | - $article_prefix . 'art_time' |
|
166 | + $article_prefix.'art_title', |
|
167 | + $article_prefix.'blog_id', |
|
168 | + $article_prefix.'art_time' |
|
169 | 169 | ); |
170 | 170 | switch ($query_type) { |
171 | 171 | case 'category': |
@@ -184,12 +184,12 @@ discard block |
||
184 | 184 | |
185 | 185 | if (!empty($blog_data)) { |
186 | 186 | $blogs[$blog_data['id']] = $blog_data['title']; |
187 | -} else { |
|
187 | +}else { |
|
188 | 188 | $blog_array = array(); |
189 | 189 | foreach (array_keys($articles_obj) as $id) { |
190 | 190 | $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1; |
191 | 191 | } |
192 | - $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN'); |
|
192 | + $criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN'); |
|
193 | 193 | $blogs = $blogHandler->getList($criteria_blog); |
194 | 194 | } |
195 | 195 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | )); |
216 | 216 | if (!empty($xoopsModuleConfig['display_summary'])) { |
217 | 217 | $_article['content'] = $articles_obj[$id]->getSummary(); |
218 | - } else { |
|
218 | + }else { |
|
219 | 219 | $_article['content'] = $articles_obj[$id]->getVar('art_content'); |
220 | 220 | } |
221 | 221 | } |
@@ -224,24 +224,24 @@ discard block |
||
224 | 224 | } |
225 | 225 | unset($articles_obj); |
226 | 226 | |
227 | -if ($count_article > $limit) { |
|
228 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
227 | +if ($count_article>$limit) { |
|
228 | + include XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
229 | 229 | $start_link = array(); |
230 | 230 | if ($sort) { |
231 | - $start_link[] = 'sort=' . $sort; |
|
231 | + $start_link[] = 'sort='.$sort; |
|
232 | 232 | } |
233 | 233 | if ($category_id) { |
234 | - $start_link[] = 'category=' . $category_id; |
|
234 | + $start_link[] = 'category='.$category_id; |
|
235 | 235 | } |
236 | 236 | if ($blog_id) { |
237 | - $start_link[] = 'blog=' . $blog_id; |
|
237 | + $start_link[] = 'blog='.$blog_id; |
|
238 | 238 | } |
239 | 239 | if ($list) { |
240 | - $start_link[] = 'list=' . $list; |
|
240 | + $start_link[] = 'list='.$list; |
|
241 | 241 | } |
242 | 242 | $nav = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&', $start_link)); |
243 | 243 | $pagenav = $nav->renderNav(4); |
244 | -} else { |
|
244 | +}else { |
|
245 | 245 | $pagenav = ''; |
246 | 246 | } |
247 | 247 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $xoopsTpl->assign('dirname', $GLOBALS['moddirname']); |
250 | 250 | |
251 | 251 | if ($category_id || $blog_id || $uid) { |
252 | - $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
252 | + $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>'); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | $link_switch = "<a href=\"" |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | . '/modules/' |
258 | 258 | . $GLOBALS['moddirname'] |
259 | 259 | . '/index.php' |
260 | - . (empty($category_id) ? '' : '/c' . $category_id) |
|
261 | - . (empty($uid) ? '' : '/u' . $uid) |
|
262 | - . (empty($blog_id) ? '' : '/b' . $blog_id) |
|
260 | + . (empty($category_id) ? '' : '/c'.$category_id) |
|
261 | + . (empty($uid) ? '' : '/u'.$uid) |
|
262 | + . (empty($blog_id) ? '' : '/b'.$blog_id) |
|
263 | 263 | . (empty($list) ? '/l1' : '') |
264 | 264 | . "\" title=\"" |
265 | 265 | . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
@@ -268,18 +268,18 @@ discard block |
||
268 | 268 | . '</a>'; |
269 | 269 | $xoopsTpl->assign('link_switch', $link_switch); |
270 | 270 | |
271 | -$link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>'; |
|
271 | +$link_blogs = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_BLOGS')."\">".planet_constant('MD_BLOGS').'</a>'; |
|
272 | 272 | $xoopsTpl->assign('link_blogs', $link_blogs); |
273 | 273 | |
274 | 274 | if (empty($uid) && is_object($xoopsUser)) { |
275 | - $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
275 | + $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>'); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) { |
279 | - $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
279 | + $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>'); |
|
280 | 280 | } |
281 | 281 | |
282 | -$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES')); |
|
282 | +$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_ARTICLES')); |
|
283 | 283 | $xoopsTpl->assign('category', @$category_data); |
284 | 284 | $xoopsTpl->assign('blog', @$blog_data); |
285 | 285 | $xoopsTpl->assign('user', @$user_data); |
@@ -289,23 +289,23 @@ discard block |
||
289 | 289 | |
290 | 290 | $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1)); |
291 | 291 | if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) { |
292 | -} elseif ($blog_id > 0) { |
|
292 | +} elseif ($blog_id>0) { |
|
293 | 293 | $xoopsTpl->assign('canrate', 1); |
294 | 294 | } |
295 | 295 | |
296 | -$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1'); |
|
296 | +$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid).(empty($blog_id) ? '' : '/b'.$blog_id).(empty($list) ? '' : '/l1'); |
|
297 | 297 | $valid_sorts = array( |
298 | 298 | 'views' => planet_constant('MD_VIEWS'), |
299 | 299 | 'rating' => planet_constant('MD_RATING'), |
300 | 300 | 'time' => planet_constant('MD_TIME'), |
301 | 301 | 'default' => planet_constant('MD_DEFAULT') |
302 | 302 | ); |
303 | -$sortlinks = array(); |
|
303 | +$sortlinks = array(); |
|
304 | 304 | foreach ($valid_sorts as $val => $name) { |
305 | 305 | if ($val == $sort) { |
306 | 306 | continue; |
307 | 307 | } |
308 | - $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>'; |
|
308 | + $sortlinks[] = "<a href=\"".$sort_link.'/'.$val."\">".$name.'</a>'; |
|
309 | 309 | } |
310 | 310 | $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks)); |
311 | 311 | $xoopsTpl->assign('version', $xoopsModule->getVar('version')); |
@@ -318,4 +318,4 @@ discard block |
||
318 | 318 | $_GET['blog'] = $blog_id; |
319 | 319 | } |
320 | 320 | |
321 | -require_once __DIR__ . '/footer.php'; |
|
321 | +require_once __DIR__.'/footer.php'; |
@@ -25,4 +25,4 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
28 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -8,13 +8,13 @@ |
||
8 | 8 | |
9 | 9 | $current_path = __FILE__; |
10 | 10 | if (DIRECTORY_SEPARATOR !== '/') { |
11 | - $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path); |
|
11 | + $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path); |
|
12 | 12 | } |
13 | 13 | $url_arr = explode('/', strstr($current_path, '/modules/')); |
14 | 14 | include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php'; |
15 | 15 | |
16 | 16 | if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO')) { |
17 | - return; |
|
17 | + return; |
|
18 | 18 | } |
19 | 19 | define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO', 1); |
20 | 20 |
@@ -11,117 +11,117 @@ |
||
11 | 11 | $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path); |
12 | 12 | } |
13 | 13 | $url_arr = explode('/', strstr($current_path, '/modules/')); |
14 | -include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php'; |
|
14 | +include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php'; |
|
15 | 15 | |
16 | -if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO')) { |
|
16 | +if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO')) { |
|
17 | 17 | return; |
18 | 18 | } |
19 | -define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO', 1); |
|
20 | - |
|
21 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_NAME', 'Planet'); |
|
22 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DESC', 'Feed Planet For Xoops'); |
|
23 | - |
|
24 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_INDEX', 'Index'); |
|
25 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARTICLE', 'Article'); |
|
26 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARCHIVE', 'Archive'); |
|
27 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_LIST', 'List'); |
|
28 | - |
|
29 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_SUBMIT', 'Submit'); |
|
30 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE', 'Articles'); |
|
31 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_DESC', ''); |
|
32 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY', 'Categories'); |
|
33 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY_DESC', ''); |
|
34 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG', 'BLogs'); |
|
35 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_DESC', ''); |
|
36 | - |
|
37 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET', 'Theme set'); |
|
38 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC', "Module-wide, select '" . _NONE . "' will use site-wide theme"); |
|
39 | - |
|
40 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT', 'Time format for display'); |
|
41 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC', ''); |
|
42 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM', 'Custom'); |
|
43 | - |
|
44 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY', 'Display summary length on article list'); |
|
45 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC', '0 for full text'); |
|
46 | - |
|
47 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG', 'Enable debug'); |
|
48 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC', ''); |
|
49 | - |
|
50 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE', 'Enable URL rewrite'); |
|
51 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required'); |
|
52 | - |
|
53 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING', 'Enable sibling articles'); |
|
54 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC', ''); |
|
55 | - |
|
56 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE', 'Articles on one page'); |
|
57 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC', ''); |
|
58 | - |
|
59 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE', 'Lists on one page'); |
|
60 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC', ''); |
|
61 | - |
|
62 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE', 'Blogs for each update'); |
|
63 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC', ''); |
|
64 | - |
|
65 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE', 'Time for article to expire'); |
|
66 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC', 'In days'); |
|
67 | - |
|
68 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT', 'Copyright'); |
|
69 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC', ''); |
|
70 | - |
|
71 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PING', 'Pings'); |
|
72 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC', 'URLs to ping'); |
|
73 | - |
|
74 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks'); |
|
75 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC', ''); |
|
76 | - |
|
77 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_MODERATION', 'Moderator to approve'); |
|
78 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_MEMBER', 'Member atuo-approve'); |
|
79 | - |
|
80 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog'); |
|
81 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC', ''); |
|
82 | - |
|
83 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE', 'Allow anonymous to rate'); |
|
84 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC', ''); |
|
85 | - |
|
86 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON', 'Pseudo cron'); |
|
87 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs'); |
|
88 | - |
|
89 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_INDEX', 'Index'); |
|
90 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_CATEGORY', 'Category'); |
|
91 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOG', 'Blog'); |
|
92 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ARTICLE', 'Article'); |
|
93 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOCK', 'Block'); |
|
94 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ABOUT', 'About'); |
|
95 | - |
|
96 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFY', 'Global'); |
|
97 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFYDSC', 'Global notification options'); |
|
98 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFY', 'Blog'); |
|
99 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFYDSC', 'Blog notification options'); |
|
100 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFY', 'Article'); |
|
101 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFYDSC', 'Article notification options'); |
|
102 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission'); |
|
103 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog'); |
|
104 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted'); |
|
105 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted'); |
|
106 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog'); |
|
107 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published'); |
|
108 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published'); |
|
109 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published'); |
|
110 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor'); |
|
111 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles'); |
|
112 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles'); |
|
113 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action'); |
|
114 | - |
|
115 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved'); |
|
116 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog'); |
|
117 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved'); |
|
118 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved'); |
|
119 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated'); |
|
120 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog'); |
|
121 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated'); |
|
122 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated'); |
|
123 | - |
|
124 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor'); |
|
125 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article'); |
|
126 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article'); |
|
127 | -define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published'); |
|
19 | +define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO', 1); |
|
20 | + |
|
21 | +define($GLOBALS['VAR_PREFIXU'].'_MI_NAME', 'Planet'); |
|
22 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DESC', 'Feed Planet For Xoops'); |
|
23 | + |
|
24 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_INDEX', 'Index'); |
|
25 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARTICLE', 'Article'); |
|
26 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARCHIVE', 'Archive'); |
|
27 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_LIST', 'List'); |
|
28 | + |
|
29 | +define($GLOBALS['VAR_PREFIXU'].'_MI_SUBMIT', 'Submit'); |
|
30 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE', 'Articles'); |
|
31 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_DESC', ''); |
|
32 | +define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY', 'Categories'); |
|
33 | +define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY_DESC', ''); |
|
34 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG', 'BLogs'); |
|
35 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_DESC', ''); |
|
36 | + |
|
37 | +define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET', 'Theme set'); |
|
38 | +define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC', "Module-wide, select '"._NONE."' will use site-wide theme"); |
|
39 | + |
|
40 | +define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT', 'Time format for display'); |
|
41 | +define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC', ''); |
|
42 | +define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM', 'Custom'); |
|
43 | + |
|
44 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY', 'Display summary length on article list'); |
|
45 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC', '0 for full text'); |
|
46 | + |
|
47 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG', 'Enable debug'); |
|
48 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC', ''); |
|
49 | + |
|
50 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE', 'Enable URL rewrite'); |
|
51 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required'); |
|
52 | + |
|
53 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING', 'Enable sibling articles'); |
|
54 | +define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC', ''); |
|
55 | + |
|
56 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE', 'Articles on one page'); |
|
57 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC', ''); |
|
58 | + |
|
59 | +define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE', 'Lists on one page'); |
|
60 | +define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC', ''); |
|
61 | + |
|
62 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE', 'Blogs for each update'); |
|
63 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC', ''); |
|
64 | + |
|
65 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE', 'Time for article to expire'); |
|
66 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC', 'In days'); |
|
67 | + |
|
68 | +define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT', 'Copyright'); |
|
69 | +define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC', ''); |
|
70 | + |
|
71 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PING', 'Pings'); |
|
72 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC', 'URLs to ping'); |
|
73 | + |
|
74 | +define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks'); |
|
75 | +define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC', ''); |
|
76 | + |
|
77 | +define($GLOBALS['VAR_PREFIXU'].'_MI_MODERATION', 'Moderator to approve'); |
|
78 | +define($GLOBALS['VAR_PREFIXU'].'_MI_MEMBER', 'Member atuo-approve'); |
|
79 | + |
|
80 | +define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog'); |
|
81 | +define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC', ''); |
|
82 | + |
|
83 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE', 'Allow anonymous to rate'); |
|
84 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC', ''); |
|
85 | + |
|
86 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON', 'Pseudo cron'); |
|
87 | +define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs'); |
|
88 | + |
|
89 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_INDEX', 'Index'); |
|
90 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_CATEGORY', 'Category'); |
|
91 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOG', 'Blog'); |
|
92 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ARTICLE', 'Article'); |
|
93 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOCK', 'Block'); |
|
94 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ABOUT', 'About'); |
|
95 | + |
|
96 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFY', 'Global'); |
|
97 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFYDSC', 'Global notification options'); |
|
98 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFY', 'Blog'); |
|
99 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFYDSC', 'Blog notification options'); |
|
100 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFY', 'Article'); |
|
101 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFYDSC', 'Article notification options'); |
|
102 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission'); |
|
103 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog'); |
|
104 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted'); |
|
105 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted'); |
|
106 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog'); |
|
107 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published'); |
|
108 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published'); |
|
109 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published'); |
|
110 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor'); |
|
111 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles'); |
|
112 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles'); |
|
113 | +define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action'); |
|
114 | + |
|
115 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved'); |
|
116 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog'); |
|
117 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved'); |
|
118 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved'); |
|
119 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated'); |
|
120 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog'); |
|
121 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated'); |
|
122 | +define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated'); |
|
123 | + |
|
124 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor'); |
|
125 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article'); |
|
126 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article'); |
|
127 | +define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published'); |