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

makingfastcash22

Senior Member
Joined
Feb 15, 2009
Messages
1,159
Reaction score
180
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?
 
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.
 
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.
 
I had this working great, however some links are still getting thru.

I quess I can't be 100% :)
 
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.
 
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. :)
 
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.
 
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.
Yeah you're right. 2.11 uses post instead of content. However I believe 2.12 switches back to content instead of post.
 
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.
 
Last edited:
@ 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.
 
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}.
 
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 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
 
@http://www.blackhatworld.com/blackhat-seo/members/40494-agatto2.html

i think the latest version has their own options for this...isn't?
 
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? :)
 
hey guys, what about the links that are in rss feeds?

I'd like to know this too, if the above posters are still around? :o

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}
 
I came to this thread exactly searching for the same solution i.e wizardrss. Can someone tell us how to do that
 
I came to this thread exactly searching for the same solution i.e wizardrss. Can someone tell us how to do that

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!)
 
Back
Top