Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-21-2012, 02:15 PM   #1
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
How do this with wordpress? Mass replace post content and links

Hello i bought a bbw blog thats filled with pirate download links like this

http://pimpandhost.com/images/141000-original.html

and text like this (links are not clickable on blog) I would like to completely delete this box on about 1200 post

[downloads_box title="Big Big Babes 29"]

http://depositfiles.com/files/wcqsj715h

http://depositfiles.com/files/lyfqkq95c

http://depositfiles.com/files/v58orlv23

or

http://www.wupload.com/file/78468061...AABU.part1.rar

http://www.wupload.com/file/78730349...AABU.part2.rar

http://www.wupload.com/file/78771182...AABU.part3.rar

[/downloads_box]


The issue with search and replace plugin i see so far is i cant do this:

Search for: http://pimpandhost.com/images/*any query string*
and Replace with: aebn link or something.

Is there a way to do this in mysql or should i just delete the 1200+ post? The blog has 3900 + post of course the latest 1200 are pirate link post but I for some reason i think this kid would have made more money with all sponsor content, but looks like when the fetishhits rss feed stopped he started pirating lol. Anyways any help with this would be appreciated thanks.
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot

Last edited by tonyparra; 03-21-2012 at 02:19 PM..
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 02:20 PM   #2
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
bumppppp
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 02:30 PM   #3
pr0phet
Confirmed User
 
Industry Role:
Join Date: Jan 2005
Posts: 1,041
just search and replace the domain names in mysql and then send to your own domain that just refreshes all the 404's etc to your own landing page or to aebn if they catch your refreshes.
__________________
Pr0phet
pr0phet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 06:05 PM   #4
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Quote:
Originally Posted by pr0phet View Post
just search and replace the domain names in mysql and then send to your own domain that just refreshes all the 404's etc to your own landing page or to aebn if they catch your refreshes.
ok got the first part come again?
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 06:39 PM   #5
mromro
So Fucking Banned
 
Industry Role:
Join Date: Jan 2011
Posts: 770
search and replace plugin

http://wordpress.org/extend/plugins/search-and-replace/
mromro is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 07:48 PM   #6
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
fuck it ill just delete this shit
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2012, 11:16 PM   #7
ottopottomouse
She is ugly, bad luck.
 
ottopottomouse's Avatar
 
Industry Role:
Join Date: Jan 2010
Posts: 13,177
Quote:
Originally Posted by tonyparra View Post
ok got the first part come again?
404 page with PHP redirect either to your home page or sponsor - it will collect everyone that goes to one of the replaced links as they don't exist as a file on your domain.
__________________
↑ see post ↑
13101
ottopottomouse is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2012, 06:59 AM   #8
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,439
Quote:
Originally Posted by tonyparra View Post
fuck it ill just delete this shit
do search and replace regex, and get the regex for the download box part, if thats the only thing you are removing.
__________________
My WP Tube Themes
fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2012, 07:29 AM   #9
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,439
regex could be something like

Code:
$html = '[downloads_box title="big boobs"]http://www.domain.com/files/files.avi.html[/downloads_box]';
$regex = '/\[(\[?)(downloads_box)\b([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/s';
$new = preg_replace($regex,' replacement',$html);
echo $html . 'will be replaced with' . $new;
or something
__________________
My WP Tube Themes
fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2012, 08:51 AM   #10
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
It looks like a shortcode plugin or function "downloads_box", could you just deactivate/delete the plugin? Then add this to your functions.php file somewhere to empty the info.

Code:
function my_downloads_box( $atts, $content = null ) {
 return '';
}
add_shortcode( 'downloads_box', 'my_downloads_box' );
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2012, 09:54 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,439
Quote:
Originally Posted by Brujah View Post
It looks like a shortcode plugin or function "downloads_box", could you just deactivate/delete the plugin? Then add this to your functions.php file somewhere to empty the info.

Code:
function my_downloads_box( $atts, $content = null ) {
 return '';
}
add_shortcode( 'downloads_box', 'my_downloads_box' );
ya that would be easiest to null the return
__________________
My WP Tube Themes
fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2012, 11:39 PM   #12
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
you guys are past awesomeness
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2012, 02:24 PM   #13
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,439
if you want to remove it completely from the db, here is the code i use/used

Code:
function remove_shortcode_from_db($shortcode = 'button') {

    global $wpdb;

    $posts = $wpdb->get_results("SELECT ID,post_title,post_content FROM $wpdb->posts");
    $regex = '/\[(\[?)('.$shortcode.')\b([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/s';

    foreach($posts as $post) {
        $final = preg_replace($regex,'',$post->post_content);
        $change = $wpdb->update( $wpdb->posts, array('post_content' => $final), array('ID' => $post->ID));
    }
}
Code:
remove_shortcode_from_db('downloads_box');
always backup your database before doing any mods like this.
__________________
My WP Tube Themes
fris at fris.net

Last edited by fris; 03-25-2012 at 02:25 PM.. Reason: ps, only run once.
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2012, 02:34 PM   #14
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,332
Quote:
Originally Posted by tonyparra View Post
How do this with wordpress? Mass replace post content and links.
You are a CyberSEO customer. Am I right? If so, just go to CyberSEO->Tools and find the "PHP Code <?php .. ?>" box. You can use it to modify every existing post (title, content, excerpt). For example, if you want to replace "word1" to "word2" in every post and its excerpt, simple put the following code into the "PHP Code <?php .. ?>" box and click the "Apply" button:

Code:
$post->post_content = str_replace('word1', 'word2', $post->post_content);
$post->post_excerpt = str_replace('word1', 'word2', $post->post_excerpt);
If you want, say, remove "bad_word" for the post tittle, the code will be as simple as this:

Code:
$post->post_title = str_replace('bad_word', '', $post->post_title);
etc
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2012, 04:26 PM   #15
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,439
Quote:
Originally Posted by CyberSEO View Post
You are a CyberSEO customer. Am I right? If so, just go to CyberSEO->Tools and find the "PHP Code <?php .. ?>" box. You can use it to modify every existing post (title, content, excerpt). For example, if you want to replace "word1" to "word2" in every post and its excerpt, simple put the following code into the "PHP Code <?php .. ?>" box and click the "Apply" button:

Code:
$post->post_content = str_replace('word1', 'word2', $post->post_content);
$post->post_excerpt = str_replace('word1', 'word2', $post->post_excerpt);
If you want, say, remove "bad_word" for the post tittle, the code will be as simple as this:

Code:
$post->post_title = str_replace('bad_word', '', $post->post_title);
etc
that doesnt revmoe it from the db though, its just being replaced via the post object.
__________________
My WP Tube Themes
fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-27-2012, 02:41 PM   #16
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Quote:
Originally Posted by CyberSEO View Post
You are a CyberSEO customer. Am I right? If so, just go to CyberSEO->Tools and find the "PHP Code <?php .. ?>" box. You can use it to modify every existing post (title, content, excerpt). For example, if you want to replace "word1" to "word2" in every post and its excerpt, simple put the following code into the "PHP Code <?php .. ?>" box and click the "Apply" button:

Code:
$post->post_content = str_replace('word1', 'word2', $post->post_content);
$post->post_excerpt = str_replace('word1', 'word2', $post->post_excerpt);
If you want, say, remove "bad_word" for the post tittle, the code will be as simple as this:

Code:
$post->post_title = str_replace('bad_word', '', $post->post_title);
etc
Yes, i didnt consider this option because i bought the site as is. I used a combo of the things above though. BTW Cyberseo rocks
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-27-2012, 02:45 PM   #17
SZNY
SZNY
 
SZNY's Avatar
 
Industry Role:
Join Date: May 2004
Location: Sexy Republic
Posts: 2,798
Here some queries that can be useful

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field. The URL values in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, '212-555-1212', '212-444-1212') WHERE `meta_key` LIKE 'DeptPhone'
__________________
Skype: sjmanthonio
san at ctrlventure dot com

Last edited by SZNY; 03-27-2012 at 02:46 PM..
SZNY is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.