How To Remove RSS Links Form Sidebar Category list

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Regular Joe

How To Remove RSS Links Form Sidebar Category list

Post by Regular Joe »

Hey,

I am trying to remove the XML rss feed links form the category list. I have identified the document serendipity_functions.inc.php as the source of it. The following code is the relevant section;

Code: Select all

 case 3:
                    $category_id = serendipity_makeFilename($cat['category_name']);
                    if (!empty($xmlImg)) {
                        $ret .= sprintf(
                          '<a href="%s" title="%s"><img alt="xml " %s src="%s" /></a> %s' .
                          '<a href="%s" title="%s">%s</a><br />',
                          $serendipity['serendipityHTTPPath'] . 'rss.php?category=' . $cat['categoryid'] . '_' . $category_id,
                          htmlspecialchars($cat['category_description']),
The line with img alt "xml" in it is the line that calls the image and makes the link. If i remove this line, or various parts of it i get various results none of which are just removing the image.

Any suggestions?


Regual Joe
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How To Remove RSS Links Form Sidebar Category list

Post by garvinhicking »

If you just remove the IMG-Tag from the list, the order of printf() variables will fail.

Instead, change your code to this:

Code: Select all

                case 3:
                     unset($xmlImg);
                    $category_id = serendipity_makeFilename($cat['category_name']);
                    if (!empty($xmlImg)) {
                        $ret .= sprintf(
The inserted part is the unset($xmlImg); one. With that you unset any possible XML image and thus the function won't output the img code part.

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply