Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-18 23:03:33

textpress
Member
Registered: 2006-04-18
Posts: 10
Website

Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Let me preface this with the following:

I’m trying to keep my TextPattern code base fairly stock, despite having at least three or four plugins active; as I have about 20 different installs; 16 external sites, and my own for development, et al. I do not enjoy the thought of having to audit and patch the crap out of things: that’s why I gave up on phpBB2 – yet, that’s another story. ;)

I’m trying to keep things fairly lean; I am running a dynamic system, but I might end up doing as others have in the past, and using jpcache on the front end, or whatnot, to improve results and response time.

Along with this, and my love of textile, is the fact that I’m beyond anal about things; speed, security, and disabling features I don’t need. I don’t want RSS support, but I do want the ability to use ‘clean URLs’, so I can either look for where it has ‘RSS’ checking and disable that, or hope for something simple I haven’t seen, yet.

If you’re looking to speed up TP yourself, keep these in mind (even though they’ve been documented before, and are likely to be so again):

1) TextPattern, by default, has internal logging turned on. You probably don’t want this. Myself, I use the excellent SlimStat, which you can integrate directly with TP with the wet_slimstat plugin. Disable TP’s internal logger when you’ve got everything live.

2)TP, by default, does not compress pages. Being a blog, it’s likely mostly text. Text compresses pretty well, and doesn’t take a lotof effort. Turning on gzip with a ‘level 5’ compression has taken my pages from 10k+ down to about 2-3k per load. That’s 33%! Look into wrapping it with gzip (ob_gzhandler) to use less bandwidth at a very minor CPU impact.

Here’s an incredibly trivial example:

<code><?php ini_set(‘zlib.output_compression_level’, 5); ob_start(“ob_gzhandler”); include(“./path/to/textpattern/root/directory/index.php”);
?></code>

3) There is no number three. (Ok, there IS a bug in textile. When you close a code tag, it doesn’t properly escape multiple newlines..)

Cheers!

Last edited by textpress (2006-04-18 23:04:53)

Offline

#2 2006-04-18 23:30:46

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

You might also like to read the FAQ.

(Ok, there IS a bug in textile. When you close a code tag, it doesn’t properly escape multiple newlines..)

And you reported this bug where, exactly?


Alex

Offline

#3 2006-04-18 23:38:29

textpress
Member
Registered: 2006-04-18
Posts: 10
Website

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

zem wrote:

You might also like to read the FAQ.

(Ok, there IS a bug in textile. When you close a code tag, it doesn’t properly escape multiple newlines..)

And you reported this bug where, exactly?

Thanks for the link. I haven’t reported the bug as I wanted to ensure that it had this issue elsewhere. Seeing it active on the modified PunBB base reminded me that it was there – being that I rarely use code snippits; I forgot entirely about it; however, thanks for being condescending! (If you’re just trying to be ‘to the point, ignore my counter-snipe; I’m just tired of being sniped at.) :)

Last edited by textpress (2006-04-18 23:39:28)

Offline

#4 2006-04-18 23:49:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Er, where is your question(s)?

Offline

#5 2006-04-19 00:33:54

textpress
Member
Registered: 2006-04-18
Posts: 10
Website

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Mary wrote:

Er, where is your question(s)?

Hi Mary.

Seen your plugins – and they’ve been quite helpful in figuring things out the TP way – as well a zem’s; glad to see you’re back!

I want to entirely remove RSS; not just set it to zero articles. Is it possible to do this without straying too far from the base code? I haven’t looked too far into it, but I know from experience that I don’t want to maintain an entirely seperate tree.

Thanks!

Offline

#6 2006-04-19 01:59:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

When you say remove, what do you mean exactly? If the feed is empty, and you don’t link to it, what’s the harm of it being there, just not used?

Offline

#7 2006-04-19 05:47:27

textpress
Member
Registered: 2006-04-18
Posts: 10
Website

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Mary wrote:

When you say remove, what do you mean exactly? If the feed is empty, and you don’t link to it, what’s the harm of it being there, just not used?

Primarily paranoia – however, I don’t really want to use mod_rewrite to redirect calls; I just don’t like having excessive bits that I won’t be using for my entry system. As I said, I can live with it; I was just hoping for a simple way to remove support – such as it being added via the callback method. I haven’t done the deep footwork into TextPattern yet, and figured there’d be many here more knowledgeable that I.

Thanks!

Offline

#8 2006-04-19 07:01:17

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Write a plugin that checks for rss-type urls (see function preText() on how to do that, there’s two ways) and then die()s. You don’t even have to use a callback as plugin-code are loaded and executed before the feed-stuff.

Offline

#9 2006-04-20 07:08:46

textpress
Member
Registered: 2006-04-18
Posts: 10
Website

Re: Entirely remove RSS (Not just set to 0 articles?) w/Bonus speed tips!

Sencer wrote:

Write a plugin that checks for rss-type urls (see function preText() on how to do that, there’s two ways) and then die()s. You don’t even have to use a callback as plugin-code are loaded and executed before the feed-stuff.

Excellent. Exactly what I was looking for. Thanks so much!

Offline

Board footer

Powered by FluxBB