Changeset 1210
- Timestamp:
- 02/22/10 05:41:34 (3 years ago)
- Location:
- trunk/content/plugins
- Files:
-
- 12 edited
- 1 copied
-
. (modified) (1 prop)
-
related_posts/readme.txt (modified) (1 diff)
-
related_posts/related_posts.php (modified) (4 diffs)
-
sb_base/languages/sb_base_language.php (modified) (1 diff)
-
sb_base/libs/SbBaseFunctions.php (modified) (1 diff)
-
sb_base/readme.txt (modified) (1 diff)
-
sb_base/sb_base.php (modified) (4 diffs)
-
sb_base/templates/sb_list.php (modified) (2 diffs)
-
sb_base/templates/sb_no_posts.php (copied) (copied from branches/1.2/content/plugins/sb_base/templates/sb_no_posts.php)
-
stop_spam/libs/StopSpam.php (modified) (1 diff)
-
stop_spam/readme.txt (modified) (1 diff)
-
stop_spam/stop_spam.php (modified) (1 diff)
-
submit/libs/SubmitFunctions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/content/plugins
-
Property
svn:mergeinfo
set to
/branches/1.0/content/plugins merged eligible /branches/1.2/content/plugins merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/content/plugins/related_posts/readme.txt
r1190 r1210 15 15 Changelog 16 16 --------- 17 v.0.4 2010/02/22 - Nick - Caches the HTML results until the tags table is updated 17 18 v.0.3 2010/02/20 - Nick - Fix for SQL warning when no tags present 18 19 v.0.2 2009/12/31 - Nick - Compatibility with Hotaru 1.0 -
trunk/content/plugins/related_posts/related_posts.php
r1190 r1210 3 3 * name: Related Posts 4 4 * description: Show a list of related posts 5 * version: 0. 35 * version: 0.4 6 6 * folder: related_posts 7 7 * class: relatedPosts … … 165 165 $search_terms = $tags; 166 166 167 $need_cache = false; 168 169 // check for a cached version and use it if no recent update: 170 $output = $h->smartCache('html', 'tags', 60, '', 'related_posts_' . $original_id); 171 if ($output) { 172 echo $output; // cached HTML 173 return true; 174 } else { 175 $need_cache = true; 176 } 177 178 // get the results and generate HTML: 167 179 $output = $this->showRelatedPosts($h, $search_terms, $num_posts); 180 181 // write them to the cache 182 if ($need_cache) { 183 $h->smartCache('html', 'tags', 60, $output, 'related_posts_' . $original_id); // make or rewrite the cache file 184 } 185 168 186 echo $output; 169 187 … … 213 231 214 232 /** 215 * Message when no related posts found, or no tags present 233 * Message when no related posts found, or no tags present on submit step 3 216 234 * 217 235 * @param string $output … … 220 238 public function noRelatedPosts($h, $output = '') 221 239 { 222 // Commented this out because I doubt anyone will want to see a "No related posts found" message. Handy for testing, though! 223 /* 224 $output .= "<div id='related_posts_none'>\n"; 225 $output .= $h->lang['related_links_no_results']; 226 $output .= "</div>\n"; 227 */ 240 if ($h->isPage('submit3')) { 241 $output .= "<div id='related_posts_none'>\n"; 242 $output .= $h->lang['related_links_no_results']; 243 $output .= "</div>\n"; 244 } 228 245 229 246 return $output; -
trunk/content/plugins/sb_base/languages/sb_base_language.php
r1190 r1210 40 40 $lang["sb_base_top_365_days"] = "Top Posts (last 365 Days)"; 41 41 $lang["sb_base_top_all_time"] = "Top Posts (All-Time)"; 42 $lang["sb_base_no_posts"] = "No posts found."; 42 43 43 44 /* Post */ -
trunk/content/plugins/sb_base/libs/SbBaseFunctions.php
r1190 r1210 327 327 // When a user clicks a parent category, we need to show posts from all child categories, too. 328 328 // This only works for one level of sub-categories. 329 if ($category ) {329 if ($category && $cat_id) { 330 330 $filter_string = '(post_category = %d'; 331 331 $values = array($cat_id); -
trunk/content/plugins/sb_base/readme.txt
r1190 r1210 14 14 Changelog 15 15 --------- 16 v.0.3 2010/02/21 - Nick - Bug fixes, cleaner list template and new "sb_no_posts" template 16 17 v.0.2 2010/02/18 - Nick - Code changes for pagination 17 18 v.0.1 2009/12/16 - Nick - Released first version -
trunk/content/plugins/sb_base/sb_base.php
r1190 r1210 3 3 * name: SB Base 4 4 * description: Social Bookmarking base - provides "list" and "post" templates. 5 * version: 0. 25 * version: 0.3 6 6 * folder: sb_base 7 7 * class: SbBase … … 123 123 // get settings 124 124 $h->vars['sb_base_settings'] = $h->getSerializedSettings('sb_base'); 125 $ h->vars['posts_per_page']= $h->vars['sb_base_settings']['posts_per_page'];125 $posts_per_page = $h->vars['sb_base_settings']['posts_per_page']; 126 126 127 127 // if a list, get the posts: … … 129 129 { 130 130 case 'list': 131 $h->vars['post_count'] = $sb_funcs->prepareList($h, '', 'count'); // get the number of posts 132 $h->vars['post_query'] = $sb_funcs->prepareList($h, '', 'query'); // and the SQL query used 131 $post_count = $sb_funcs->prepareList($h, '', 'count'); // get the number of posts 132 $post_query = $sb_funcs->prepareList($h, '', 'query'); // and the SQL query used 133 $h->vars['pagedResults'] = $h->pagination($post_query, $post_count, $posts_per_page, 'posts'); 133 134 break; 134 135 case 'post': … … 289 290 290 291 case 'list': 291 292 $h->displayTemplate('sb_list'); 292 if (isset($h->vars['pagedResults']->items)) { 293 $h->displayTemplate('sb_list'); 294 echo $h->pageBar($h->vars['pagedResults']); 295 } else { 296 $h->displayTemplate('sb_no_posts'); 297 } 293 298 return true; 294 299 } -
trunk/content/plugins/sb_base/templates/sb_list.php
r1190 r1210 25 25 */ 26 26 27 ?> 28 <?php 29 if ($h->vars['post_count']) { 30 31 $pagedResults = $h->pagination($h->vars['post_query'], $h->vars['post_count'], $h->vars['posts_per_page'], 'posts'); 32 foreach ($pagedResults->items as $post) { 33 $h->readPost(0, $post); 34 $user = new UserBase(); 35 $user->getUserBasic($h, $h->post->author); 27 foreach ($h->vars['pagedResults']->items as $post) { 28 $h->readPost(0, $post); 29 $user = new UserBase(); 30 $user->getUserBasic($h, $h->post->author); 36 31 ?> 37 32 … … 97 92 <!-- END POST --> 98 93 99 <?php 100 } 101 echo $h->pageBar($pagedResults); 102 } 103 ?> 94 <?php } ?> -
trunk/content/plugins/stop_spam/libs/StopSpam.php
r1081 r1210 100 100 $url .= "&api_key=" . $apikey; 101 101 102 /*103 // Old method:104 102 require_once(EXTENSIONS . 'SWCMS/class.httprequest.php'); 105 103 $r = new HTTPRequest($url); 106 104 $error = $r->DownloadToString(); 107 if (!$error) { echo "Success"; } else { echo $error; } 108 */ 109 110 // New method: 111 // http://www.phpfour.com/blog/2008/01/php-http-class/ 112 require_once(EXTENSIONS . 'http/class.http.php'); 113 $http = new Http(); 114 $http->execute($url); 115 //if (!$http->error) { echo "Success"; } else { echo $http->error; } 105 //if (!$error) { echo "Success"; } else { echo $error; } 116 106 } 117 107 } -
trunk/content/plugins/stop_spam/readme.txt
r1081 r1210 27 27 Changelog 28 28 --------- 29 v.0.3 2010/02/22 - Nick - Reverted to SWCMS httprequest class to avoid CURL warnings 29 30 v.0.2 2010/01/04 - Nick - Updates for compatibility with Hotaru 1.0 30 31 v.0.1 2009/11/23 - Nick - Released first version -
trunk/content/plugins/stop_spam/stop_spam.php
r1081 r1210 3 3 * name: StopSpam 4 4 * description: Checks new users against the StopForumSpam.com blacklist 5 * version: 0. 25 * version: 0.3 6 6 * folder: stop_spam 7 7 * class: StopSpam -
trunk/content/plugins/submit/libs/SubmitFunctions.php
r1190 r1210 692 692 { 693 693 require_once(EXTENSIONS . 'SWCMS/class.httprequest.php'); 694 //require_once(EXTENSIONS . 'http/class.http.php');695 694 696 695 if ($url != 'http://' && $url != ''){ 697 696 $r = new HTTPRequest($url); 698 697 $string = $r->DownloadToString(); 699 //$http = new Http();700 //$http->execute($url);701 //$string = $http->result;702 698 } else { 703 699 $string = '';
Note: See TracChangeset
for help on using the changeset viewer.