Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Here is the fix for line 79 error:

    Find the plugin file called: “lfo-todays-date-inserter.php” using the plugins editor. On line 79

    CHANGE THIS:
    if (strlen($attr[‘format’])>0){
    TO THIS:
    if (is_array($attr) && strlen($attr[‘format’])>0){

    THAT’s IT!!

    According to THIS POST, the new version of PHP thinks the variable here should be an array.

    @klokwerk-design:
    Thanks! I would have passed on this plugin without your info here…

    Forum: Plugins
    In reply to: [JinMenu] Why do not works?

    Doesn’t work for me either…

    Use the HTML code for the & character.

    Thread Starter Marcus

    (@marcdeshon)

    Do you mean that it only processes a fixed number of items each time? How many items does it process each time?

    Thanks a million!! This has saved me!!!

    Thread Starter Marcus

    (@marcdeshon)

    Hello… anyone…

    Do you still need this help… I can probably help.

    OK, I finally figured out how to do this… You have to modify core files though. So before you do it, I suggest backing up the original files related to this post (wp-includes/classes.php).

    So, to add the category count as part of the link do the following:

    1) Go to the file named classes.php in the wp-includes folder

    2) Just replace this code:

    function start_el(&$output, $category, $depth, $args) {
              extract($args);
    
              $cat_name = esc_attr( $category->name);
              $cat_name = apply_filters( 'list_cats', $cat_name, $category );
              $link = '<a href="' . get_category_link( $category->term_id ) . '" ';
              if ( $use_desc_for_title == 0 || empty($category->description) )
                  $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
              else
                  $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
              $link .= '>';
              $link .= $cat_name . '</a>';
    
              if ( (! empty($feed_image)) || (! empty($feed)) ) {
                  $link .= ' ';
    
                  if ( empty($feed_image) )
                      $link .= '(';
    
                  $link .= '<a href="' . get_category_feed_link($category->term_id, $feed_type) . '"';
    
                  if ( empty($feed) )
                      $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
                  else {
                      $title = ' title="' . $feed . '"';
                      $alt = ' alt="' . $feed . '"';
                      $name = $feed;
                      $link .= $title;
                  }
    
                  $link .= '>';
    
                  if ( empty($feed_image) )
                      $link .= $name;
                  else
                      $link .= "<img src='$feed_image'$alt$title" . ' />';
                  $link .= '</a>';
                  if ( empty($feed_image) )
                      $link .= ')';
              }
    
              if ( isset($show_count) && $show_count )
                  $link .= ' (' . intval($category->count) . ')';
    
              if ( isset($show_date) && $show_date ) {
                  $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
              }
    
              if ( isset($current_category) && $current_category )
                  $_current_category = get_category( $current_category );
    
              if ( 'list' == $args['style'] ) {
                  $output .= "\t<li";
                  $class = 'cat-item cat-item-'.$category->term_id;
                  if ( isset($current_category) && $current_category && ($category->term_id == $current_category) )
                      $class .=  ' current-cat';
                  elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) )
                      $class .=  ' current-cat-parent';
                  $output .=  ' class="'.$class.'"';
                  $output .= ">$link\n";
              } else {
                  $output .= "\t$link<br />\n";
              }
          }

    WITH THIS:

    function start_el(&$output, $category, $depth, $args) {
              extract($args);
    
              $cat_name = esc_attr( $category->name);
              $cat_name = apply_filters( 'list_cats', $cat_name, $category );
              $link = '<a href="' . get_category_link( $category->term_id ) . '" ';
              if ( $use_desc_for_title == 0 || empty($category->description) )
                  $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
              else
                  $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
              $link .= '>';
    
              if ( isset($show_count) && $show_count )
                  $link .= $cat_name . ' (' . intval($category->count) . ')</a>';
              else
                  $link .= $cat_name . '</a>';
    
              if ( (! empty($feed_image)) || (! empty($feed)) ) {
                  $link .= ' ';
    
                  if ( empty($feed_image) )
                      $link .= '(';
    
                  $link .= '<a href="' . get_category_feed_link($category->term_id, $feed_type) . '"';
    
                  if ( empty($feed) )
                      $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
                  else {
                      $title = ' title="' . $feed . '"';
                      $alt = ' alt="' . $feed . '"';
                      $name = $feed;
                      $link .= $title;
                  }
    
                  $link .= '>';
    
                  if ( empty($feed_image) )
                      $link .= $name;
                  else
                      $link .= "<img src='$feed_image'$alt$title" . ' />';
                  $link .= '</a>';
                  if ( empty($feed_image) )
                      $link .= ')';
              }
    
              if ( isset($show_date) && $show_date ) {
                  $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
              }
    
              if ( isset($current_category) && $current_category )
                  $_current_category = get_category( $current_category );
    
              if ( 'list' == $args['style'] ) {
                  $output .= "\t<li";
                  $class = 'cat-item cat-item-'.$category->term_id;
                  if ( isset($current_category) && $current_category && ($category->term_id == $current_category) )
                      $class .=  ' current-cat';
                  elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) )
                      $class .=  ' current-cat-parent';
                  $output .=  ' class="'.$class.'"';
                  $output .= ">$link\n";
              } else {
                  $output .= "\t$link<br />\n";
              }
          }

    NOTE: what I did basically was replace the line that says $link .= $cat_name . '</a>'; with what I wanted to be there if the categories were turned on…

Viewing 9 replies - 1 through 9 (of 9 total)