Page 1 of 1

How To Remove RSS Links Form Sidebar Category list

Posted: Sun Nov 14, 2004 2:41 am
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

Re: How To Remove RSS Links Form Sidebar Category list

Posted: Mon Nov 15, 2004 1:15 pm
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.