Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Blogs and Blogging (http://www.greenguysboard.com/board/forumdisplay.php?f=8)
-   -   Changing affiliate codes in WP post (http://www.greenguysboard.com/board/showthread.php?t=52850)

LD 2009-05-21 09:09 AM

Changing affiliate codes in WP post
 
Is there a utility for this? This is a mainstream site with amazon ads.

Cleo 2009-05-21 09:23 AM

You could use PhpMyAdmin to do a search and replace on the codes in the MySQL database.

LD 2009-05-21 11:01 AM

Thanks Cleo...I'm not familiar with using PhpMyAdmin, but it looks pretty straighforward and I have worked with other database tools.

cd34 2009-05-21 11:13 AM

Code:

create table wp_postsbk select * from wp_posts;
update wp_posts set post_content=replace(post_content,'oldstringtoreplace','newstringtouse');

if you mess up:

Code:

delete from wp_posts;
insert into wp_posts select * from wp_postsbk;


HowlingWulf 2009-05-21 11:25 AM

A Google search turned up http://thedeadone.net/download/searc...dpress-plugin/

LD 2009-05-21 02:34 PM

Google...who woulda thought...:)

nate 2009-05-21 08:15 PM

Quote:

Originally Posted by cd34 (Post 451908)
Code:

create table wp_postsbk select * from wp_posts;
update wp_posts set post_content=replace(post_content,'oldstringtoreplace','newstringtouse');


Its scary what some people can quote off the top of their head.

LD 2009-05-21 11:37 PM

Quote:

Originally Posted by nate (Post 451968)
Its scary what some people can quote off the top of their head.

cd34 knows his shit!

Howling, that plug worked like a charm! It took about 5 seconds...no problems whatsoever.

bDok 2009-05-22 12:19 AM

I know there is a great plugin for wordpress that is actually great for links like that.

another thing that I know that was just released is a free link directing script. Made by the same guy that did tevs tube script. I'll find a link later.

edit:

nevermind simple google found it.

http://www.bigdotmedia.com/

he's calling it tracking adult links sytem (tals).

so then you can change certain things out real easy in the future.

Simon 2009-05-22 07:25 AM

Just a quick note that you may want to always back up your WP databases before using any of the available plugins to change all your codes in one click. That was something that cd34's code handled by first creating a new table and copying your post data into it in case you needed to revert back to it. Anyone who's ever totally screwed a database with search and replace knows the value of that one line of code.

LD 2009-05-22 08:31 AM

Quote:

Originally Posted by Simon (Post 452005)
Just a quick note that you may want to always back up your WP databases before using any of the available plugins to change all your codes in one click. That was something that cd34's code handled by first creating a new table and copying your post data into it in case you needed to revert back to it. Anyone who's ever totally screwed a database with search and replace knows the value of that one line of code.

yes... i kept a local copy before running the plug.


All times are GMT -4. The time now is 12:20 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc