Thursday January 20, 2005
|
Vanity Foul Dedicated to the wanderings of an egotistical mind. |
|
Holy Macros RollerMan! JunkFood has two excellent posts on hacking Roller. The second one (the most recent) in particular levels valid criticism of Roller's documentation. At one point is was better documented, what variables were available, which macros, the interesting values and methods of the data classes. But that has all fallen woefully out of date. Comment Spam Management I finally got hit by a significant spam attack, though not as bad as many I've read about. Since Roller doesn't have good mass-comment management (it's on the list) I cobbled something together in my Latest Comments page. You might need to customize it (particularly the <form> action) and it sometimes throws exceptions. So use with care, if you dare. Finally, if you do use it you will end up on the Edit Weblog page with a partial entry - DO NOT save anything here, just click back to Latest Comments or to your front Weblog page. And note that the Pages might be cached so may not reflect comment deletion. Better now and busy. Back on the 5th of August I wrote about a couple spam problems I was having. Shortly afterward I rolled the new functionality into Roller (a Roller-wide Referer-Spam list), and I used it to block requests with those referers (they get a 403 Denied). My site has continued to be stable ever since then and I haven't seen nearly so much CPU usage. Sadly, I've been very busy with work and family the last month and haven't had time for much of anything, let alone more Roller enhancements. Referer Spammer Management in Roller As it stands now, each user is responsible for maintaining their own Referer Spam blocking list. I do this fairly religiously, but my wife does not. Her blog doesn't seem to attract as much spam as mine, but why shouldn't she benefit from my list? I think I'll add a Roller-wide blocking list to my To-Do list. Improved Search Earlier tonight I committed a long-desired Search improvement: Paging. The results are broken into pages of 10 entries. Try this search. At the top you‘ll notice a new select list labelled “Restrict by Category“. This allows the user to select a category to narrow the results. Also, after each entry is a link “restrict search to just this blog“ which will narrow the search to that entry‘s user and display in that user‘s template. If you scroll to the bottom you‘ll see “1 | 2“ which are links to the pages of results. This is the href for “2”: So you can play around with this href a bit and get different paging. I haven‘t added the necessary velocity code to individual pages yet, so currently this is limited to the sitewide search only. ( Jul 27 2004, 09:19:35 PM ) Roller PermalinkTrackback: http://www.brainopolis.com/roller/trackback/lance/Weblog/improved_search_p favicon and a simplified display I love it when users post about how they've customized Roller.
Template Decorators in Roller Last week on the Roller-Dev mailing list I promised to post an example of the "decorator" support I'd built into Roller. This functionality was inspired by Matt's post about supporting SiteMesh decoration in Roller. While I don't know if this could truly be called a Decorator, it does at least approximate what SiteMesh does (for Velocity). To demonstrate I put together a page to display the most recent comments for Vanity Foul. Besides implementing a Latest Comments page I also created a Decorator page (_mydecorator) to wrap the page in a familiar look. By specifying #set( $decorator = "_mydecorator" ) in my Latest Comments page I inform Roller of which Decorator to use (currently it defaults to a "no-op decorator").
Wanna see how I wrote that View Source Page? Update: I like this idea so much I converted my To-Do List and Wish List to use the Decorator as well.
RSYA Or "Referer Spamming Yet Again". The issue of referer spam has come up again, so I'll repost about my referer-spammer list. I've been listing it in XML, but I see now it will be more valuable to the Roller community as a comma-delimited list (suitable for copy-pasting straight into your own Spam Prevention box). Also worth mentioning is that Roller supports directly deleting Referer Spam, using the Weblog::Referers tab. |
|
||||||||