Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:sphpblog [2008/10/03 11:41]
cyril
software:sphpblog [2013/09/19 16:40] (current)
Line 18: Line 18:
   * Added links to RSS Feeds for each category and comments in themes/slick/themes.php   * Added links to RSS Feeds for each category and comments in themes/slick/themes.php
   * Removed the ''Search'' caption in the search plugin in themes/slick/themes.php   * Removed the ''Search'' caption in the search plugin in themes/slick/themes.php
 +  * Add categories in title
 +<code php>
 +themes/slick/themes.php:83
 ++// Display CATEGORIES
 ++// This is an array. There can be multiple categories per entry.
 ++if ( array_key_exists( "categories", $entry_array ) ) {
 ++ $blog_content  .= ' <font size="-1">{';
 ++ for ( $i = 0; $i < count( $entry_array[ 'categories' ] ); $i++ ) {
 ++ $cat_id = $entry_array[ 'categories_id' ][$i];
 ++ if ( $i > 0 ) 
 ++ {
 ++ if (intval($prev_id/100) != intval($cat_id/100)) 
 ++ $blog_content .= ' | ';
 ++ else
 ++ $blog_content .= ', ';
 ++ }
 ++ $prev_id = $cat_id;
 ++ $blog_content .= '<a href="index.php?category=' . $cat_id . '">' .
 ++ $entry_array[ 'categories' ][$i] . '</a>';
 ++ }
 ++ $blog_content .= '}</font>';
 ++}
 +</code>
  
 Some changes in the core too: Some changes in the core too:
   * Changed ''blog_footer'' into ''blog_description'' at scripts/sb_feed.php:57 for the ''<description>'' node because a footer is not a description...   * Changed ''blog_footer'' into ''blog_description'' at scripts/sb_feed.php:57 for the ''<description>'' node because a footer is not a description...
-  * Changed some code at scripts/sb_display.php:116 in order to allow to display sets of categories (''index.php?category=2,3,4''):+  * Changed some code in order to allow to display sets of categories (''index.php?category=2,3,4''):
 <code php> <code php>
-// new code+scripts/sb_display.php:116 
-    $cats = split( ',', $category); +-$cat_sub_arr = get_sub_categories($category); 
-    $cat_sub_arr = array(); +-array_push( $cat_sub_arr, $category );
-    for ($i = 0; $i < count($cats); $i++) +
-    { +
-        $subcats = get_sub_categories($cats[$i]); +
-        for ($j = 0; $j < count($subcats); $j++) +
-            array_push($cat_sub_arr, $subcats[$j]); +
-        array_push($cat_sub_arr, $cats[$i]); +
-    } +
- +
-// old code: +
-//      $cat_sub_arr = get_sub_categories($category); +
-//      array_push( $cat_sub_arr, $category );+
  
 ++$cats = split( ',', $category);
 ++$cat_sub_arr = array();
 ++for ($i = 0; $i < count($cats); $i++)
 ++{
 ++ $subcats = get_sub_categories($cats[$i]);
 ++ for ($j = 0; $j < count($subcats); $j++)
 ++ array_push($cat_sub_arr, $subcats[$j]);
 ++ array_push($cat_sub_arr, $cats[$i]);
 ++}
 </code> </code>
   * Create URL link for comment posters   * Create URL link for comment posters
-<code diff>+<code php>
 scripts/sb_comments.php:160 scripts/sb_comments.php:160
  $entry_array[ 'website' ] = blog_to_html( $website, true, false, true );  $entry_array[ 'website' ] = blog_to_html( $website, true, false, true );
software/sphpblog.1223034118.txt.gz · Last modified: 2013/09/19 16:43 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0