Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    remove a code part

    hello

    i need help in deleting a code part, like: table, ul ...

    the problem is that when i use rss feeds, lot of them add some code parts that i don't need
    like: <ul class=​"similar-topics">, and it shows similar topics
    so, i want to remove this code part from the rss feed
    i think that i may add a javascript code to the rss template that brings the rss feeds, so as it remove the part i define

    i hope you help me doing this, even with another idea

    another idea is to use: http://pipes.yahoo.com
    i"m sure there is a way to cut parts from the code, but i couldn't get it yet and i'm still trying

    Regards
    Last edited by ARDV; 12-28-2011 at 07:37 AM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,447
    Thanks
    76
    Thanked 4,372 Times in 4,337 Posts
    Sure you can remove text--including HTML text--from the feed contents.

    But the problem is that you need to carefully define *exactly* what you want to remove.

    In other words, say you want to remove[code]
    <ul class=​"similar-topics">
    ...
    </ul>
    [code]
    Would you *ALSO* want to remove *ALL* <ul>...</ul> tag sequences? Probably not. Okay, but what about[code]
    <ul class=​"similar-pages">
    ...
    </ul>
    [code]
    ??

    So removing any one specific thing is easy. The hard part is describing *ALL* the specific things you want to remove.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thx for replaying,

    i didn't well understand you, but i think you meant that i need to define exactly what is between <ul> ?
    if i need to do this, it will have no sense, because the code between <ul> changes with every feed

    and if you meant that i can remove all the uls, this is good
    because the class (class=​"similar-pages") will let me remove just the <ul>s i want


    Quote Originally Posted by Old Pedant View Post
    Sure you can remove text--including HTML text--from the feed contents.

    But the problem is that you need to carefully define *exactly* what you want to remove.

    In other words, say you want to remove[code]
    <ul class=​"similar-topics">
    ...
    </ul>
    [code]
    Would you *ALSO* want to remove *ALL* <ul>...</ul> tag sequences? Probably not. Okay, but what about[code]
    <ul class=​"similar-pages">
    ...
    </ul>
    [code]
    ??

    So removing any one specific thing is easy. The hard part is describing *ALL* the specific things you want to remove.

  • #4
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello
    i'm still waiting for help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •