Post Reply 
[Req] Remove user posted comments
Aug. 07, 2008, 10:52 PM
Post: #1
[Req] Remove user posted comments
Remove the comments that are posted in web pages these days.

For example http://www.slashfilm.com/2008/08/06/shan...-in-talks/ has some user comments that are of no interest.
Quote this message in a reply
Aug. 07, 2008, 10:55 PM
Post: #2
RE: [Req] Remove user posted comments
Which one do you want to remove? Or do you want to remove all?
Visit this user's website
Add Thank You Quote this message in a reply
Aug. 11, 2008, 12:13 AM
Post: #3
RE: [Req] Remove user posted comments
remove them all!

Now pirate bay just made any announcement http://thepiratebay.org/blog/123. As you can see the announcement is innteresting, however the comments are all just rubbish.

It would be nice to either completely removes or toggle comments from blogs/new article etc etc
Quote this message in a reply
Aug. 11, 2008, 03:06 AM
Post: #4
RE: [Req] Remove user posted comments
Code:
[Patterns]
Name = "Remove Comments"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 40
Match = "(<((d|u|o)l)\0([^>]++)\2>)\3$SET(flags=f$GET(flags))"
        "($TST(\2=*(id|class)=$AV(([a-z_-]++|)comment(s|list))*)"
        "$SET(1=<br />\r\nComments: <a href="javascript:;" onclick="document.getElementById('prx_hide_comments').style.display='block';">Show</a> | "
        "<a href="javascript:;" onclick="document.getElementById('prx_hide_comments').style.display='none';">Hide</a><br /><br />\r\n"
        "<div id="prx_hide_comments" style="display: none;">\r\n\3)$SET(match=\0)"
        "|$SET(1=\3))"
        "|</($TST(match))\9 >"
        "($TST(flags=ff(?*)\0&$SET(flags=\0))$SET(1=</\9>)"
        "|$TST(flags=f&$SET(flags=))$SET(1=</\9>\r\n</div>)$SET(match=))"
Replace = "\1"

Here you go!

In this filter I use Mizz Mona's technique on flagging tags, and how it matches comment containers is by comparing the ID or CLASS attribute value to a list of specific "comment" names. It allows you to toggle comments (Show/Hide).

If you find that it doesn't work on a specific site, view the source code, identify the name for the comments container, change the following expression in the filter:

Quote:$AV(([a-z_-]++|)comments)

To:

Quote:$AV(([a-z_-]++|)comments|containername)
Visit this user's website
Add Thank You Quote this message in a reply
Aug. 12, 2008, 10:15 AM
Post: #5
RE: [Req] Remove user posted comments
Thankyou first!

I was trying to remove the comments from blogspot. The comments are "comment-body". So I added "-body" to produce

Quote:$AV(([a-z_-]++|)comment(s|list|-body))*)

However the blogspot comment is not filter.

[Image: commentsrj7.png]
Quote this message in a reply
Aug. 13, 2008, 03:19 AM
Post: #6
RE: [Req] Remove user posted comments
Try this filter (all I did was just add div to the list of tags to be matched; now it matches dl, ul, ol and div):

Code:
[Patterns]
Name = "Remove Comments"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 50
Match = "(<((d|u|o)l|div)\0([^>]++)\2>)\3$SET(flags=f$GET(flags))"
        "($TST(\2=*(id|class)=$AV(([a-z_-]++|)comment(s|list))*)"
        "$SET(1=<br />\r\nComments: <a href="javascript:;" onclick="document.getElementById('prx_hide_comments').style.display='block';">Show</a> | "
        "<a href="javascript:;" onclick="document.getElementById('prx_hide_comments').style.display='none';">Hide</a><br /><br />\r\n"
        "<div id="prx_hide_comments" style="display: none;">\r\n\3)$SET(match=\0)"
        "|$SET(1=\3))"
        "|</($TST(match))\9 >"
        "($TST(flags=ff(?*)\0&$SET(flags=\0))$SET(1=</\9>)"
        "|$TST(flags=f&$SET(flags=))$SET(1=</\9>\r\n</div>)$SET(match=))"
Replace = "\1"

I'm not sure if it'll break any page; let me know if it does!
Visit this user's website
Add Thank You Quote this message in a reply
Aug. 15, 2008, 12:52 AM
Post: #7
RE: [Req] Remove user posted comments
Slashdot.org Breaks.
Quote this message in a reply
Post Reply 


Forum Jump: