1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[ASK] How to remove links from articles when using WProbot?

Discussion in 'Blogging' started by makingfastcash22, Apr 1, 2010.

  1. makingfastcash22

    makingfastcash22 Senior Member

    Joined:
    Feb 15, 2009
    Messages:
    1,152
    Likes Received:
    178
    Home Page:
    I am trying to figure the best way to get rid of the links that are in some of the articles that are posted with wp robot.

    Does anyone know about the replace formatting option?

    Will this do it?
     
  2. smashedpumpkins

    smashedpumpkins Regular Member

    Joined:
    Mar 3, 2010
    Messages:
    231
    Likes Received:
    84
    Yeah, I just went through this earlier this week. Sadly I spent a good 20 hours trying out various examples. My goal was to completely remove all links from the article. The replace formatting option will turn the article into one huge paragraph removing links and all other tags. It looks horrible and is useless. You want to leave the formatting in tact.

    Solution:
    Open up articles.php. (wp-content/plugins/wprobot/modules/articles.php) Search for the following code.
    PHP:
    $insert ma_insertpost($content,$title,$cat);
    Right underneath the code paste the following.
    PHP:
    $content preg_replace('%</?a\b[^>]*>%i'''$content);
    And you're done. I'm not sure how much PHP you understand, but basically the entire article is grabbed from Articlebase and placed into the variable "$content". The code above will search the variable "$content" and remove all links. At this point the article will be placed into your database free of links.
     
    • Thanks Thanks x 12
  3. makingfastcash22

    makingfastcash22 Senior Member

    Joined:
    Feb 15, 2009
    Messages:
    1,152
    Likes Received:
    178
    Home Page:
    Just added a rep. Thanks for the help.

    I only need to figure one more thing with WP Robot, to get it to show images for themes that use tim thumb.

    I have some templates that have sliders and I am not sure if it is because WP Robot does not save images that I cannot get it to work with these themes; or it maybe a simple PHP tweak that I don't know about.

    Also can't get it to show Youtube thumbs..

    Thanks Smashed ... You rock.
     
  4. makingfastcash22

    makingfastcash22 Senior Member

    Joined:
    Feb 15, 2009
    Messages:
    1,152
    Likes Received:
    178
    Home Page:
    I had this working great, however some links are still getting thru.

    I quess I can't be 100% :)
     
  5. CashFlowGuy

    CashFlowGuy Regular Member

    Joined:
    Mar 15, 2010
    Messages:
    357
    Likes Received:
    67
    Spin the article rather then taking out the links. A guy did that to me and guess what, Now i cant sell my articles. Besides if the guy finds out and he's like me he will try to make you his bitch.
     
  6. makingfastcash22

    makingfastcash22 Senior Member

    Joined:
    Feb 15, 2009
    Messages:
    1,152
    Likes Received:
    178
    Home Page:
    How come you can't sell them? There are tons of places to sell them.

    I do hear what you are saying about keeping them. :)
     
  7. hyperlite

    hyperlite Regular Member

    Joined:
    Nov 24, 2008
    Messages:
    214
    Likes Received:
    25
    Hey bro,

    I tried this and all the links were still showing up for me too so I did a little digging. You have to replace $content with $post in the second line. There may have been a code change in a newer version or something but the article content is called $post and not $content. That's why they were still showing up. I changed it and pulled a few articles and no links!

    If anyone messes with you about stripping the links the worst that'll happen is you'll have to take the article down. Kinda sucks if you're the author but it happens to me all the time and usually when I ask they just post up the link with no trouble.
     
  8. Dubulous

    Dubulous Newbie

    Joined:
    Mar 14, 2010
    Messages:
    13
    Likes Received:
    1
    Thanks guys!
     
  9. smashedpumpkins

    smashedpumpkins Regular Member

    Joined:
    Mar 3, 2010
    Messages:
    231
    Likes Received:
    84
    Yeah you're right. 2.11 uses post instead of content. However I believe 2.12 switches back to content instead of post.
     
    • Thanks Thanks x 1
  10. kenblack

    kenblack Regular Member

    Joined:
    Feb 10, 2010
    Messages:
    365
    Likes Received:
    193
    Location:
    Tropical Paradise
    Home Page:
    The proper way to accomplish this is not to strip links from $post as you may want to customize the posting template to include links of your own.

    What should be done is insert this code:
    PHP:
    $textc preg_replace('%</?a\b[^>]*>%i'''$textc);
    $authorbox preg_replace('%</?a\b[^>]*>%i'''$authorbox);
    $keyword2 preg_replace('%</?a\b[^>]*>%i'''$keyword2);
    For WPRobot 2.11
    right below:
    PHP:
    $post get_option'ma_eza_template'); //'{thumbnail}{description}{link}');;
    For WPRobot 2.12
    right below:
    PHP:
    $content get_option'ma_eza_template'); //'{thumbnail}{description}{link}');;
    This will only remove links from the article, while leaving the links in your posting template (that you might have added yourself) intact.
     
    • Thanks Thanks x 3
    Last edited: Apr 15, 2010
  11. yuvraj

    yuvraj Regular Member

    Joined:
    Jan 26, 2010
    Messages:
    290
    Likes Received:
    166
    Location:
    Inside
    Thanks kenblack..
     
    • Thanks Thanks x 1
  12. kenblack

    kenblack Regular Member

    Joined:
    Feb 10, 2010
    Messages:
    365
    Likes Received:
    193
    Location:
    Tropical Paradise
    Home Page:
    @ joeflizo
    With WPRobot, they allow you to customize the posting template for each posting method (articles, ebay, etc..).

    For example, the default one for articles is:
    Code:
    {article}
    {authorbox}
    What you can do is customize this by adding your own text and links (enter it as html). I also make a habit of removing the author box, but that is just my preference.

    With the code I posted, it will remove all links from the original article, but it will keep the ones in the template, that you added yourself. This can be affiliate links, or anything else you add.
     
  13. kenblack

    kenblack Regular Member

    Joined:
    Feb 10, 2010
    Messages:
    365
    Likes Received:
    193
    Location:
    Tropical Paradise
    Home Page:
    You can design an author box in a WYSIWYG editor, to mimic the standard WP Robot one, then put the html code in the template after {article}.
     
  14. agatto2

    agatto2 Newbie

    Joined:
    Mar 28, 2009
    Messages:
    21
    Likes Received:
    2
    Occupation:
    Internet Marketing
    Location:
    Peru
    Home Page:
    Thanks for that Ken - Do you happen to know where we place it for the new version?

    I cannot seem to locate the proper code location
     
  15. SilentFox

    SilentFox BANNED BANNED

    Joined:
    May 16, 2010
    Messages:
    157
    Likes Received:
    11
    @http://www.blackhatworld.com/blackhat-seo/members/40494-agatto2.html

    i think the latest version has their own options for this...isn't?
     
  16. makingfastcash22

    makingfastcash22 Senior Member

    Joined:
    Feb 15, 2009
    Messages:
    1,152
    Likes Received:
    178
    Home Page:
    In WPR 3.06 if you remove the {authortext} from the main article template, I still get links in the post....

    Is there a cure? :)
     
  17. werrich

    werrich Regular Member

    Joined:
    Feb 17, 2009
    Messages:
    374
    Likes Received:
    42
    hey guys, what about the links that are in rss feeds?
     
  18. muchacho

    muchacho Supreme Member

    Joined:
    May 14, 2009
    Messages:
    1,293
    Likes Received:
    187
    Location:
    Lancashire, England.
    I'd like to know this too, if the above posters are still around? :eek:

    I'm using WizardRSS to get the full content and post it to my blog.

    Now, the links at the bottom are no longer 'live' but it's still including a link back to the source at the very bottom of the content.

    For example:
    link1 : link 2: link 3 {these have successfully been removed and are no longer hyperlinked - althought the text is there.

    Then underneath:
    {link to article/news source}
     
  19. GoodFellas#07

    GoodFellas#07 Newbie

    Joined:
    Dec 1, 2010
    Messages:
    34
    Likes Received:
    5
    I came to this thread exactly searching for the same solution i.e wizardrss. Can someone tell us how to do that
     
  20. muchacho

    muchacho Supreme Member

    Joined:
    May 14, 2009
    Messages:
    1,293
    Likes Received:
    187
    Location:
    Lancashire, England.
    Grab the original RSS Feed and go to:

    Code:
    http://www.wizardrss.com/
    Input the RSS address and it'll give you a new WizardRSS feed... use this one instead and it'll give you the full content of the RSS Feed.

    I've not tested it on Google News yet though, but it def works on the feeds I've been using, which originally were only giving me the title, a brief description and then linking to the source for the visitor to read more (Not what you want!)