GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   A Wordpress script/plugin that can do this? (https://gfy.com/showthread.php?t=1161104)

jscott 02-12-2015 03:34 PM

A Wordpress script/plugin that can do this?
 
When you create "galleries" or posts in wordpress, you get the option to let each thumb link to:

1. Attachement page, 2. Media File, 3. none

Anyone know if there is a script/plugin that can change ALL the blog posts to one or the other?

Thanks

Tom.K 02-12-2015 07:34 PM

it would be useless by my opinion. wouldn't be? if you can change all links at once, there would be option to change only to one specific link. it could be useful if you want to set all to none or to change only first part of the link like domain and directory.

anyway, check this plugin, maybe this you can use it somehow:

https://wordpress.org/plugins/velvet-blues-update-urls/

brassmonkey 02-12-2015 08:24 PM

talk to homer simpson he's good

jscott 02-13-2015 04:37 AM

Tom, thanks man, will check it out. The reason I'm asking is, I want to raise my clicks to sponsors for more chance of sales, from linking eat thumbnail to a page ,and on that page the large image links to the sponsor, and also bottom/top of image could put some adverts too.

brassmonkey, thanks, I'll search for Homer's contact info and give him a wassup :)

just a punk 02-13-2015 04:40 AM

Ops ...

brassmonkey 02-13-2015 10:30 AM

Quote:

Originally Posted by jscott (Post 20391956)
Tom, thanks man, will check it out. The reason I'm asking is, I want to raise my clicks to sponsors for more chance of sales, from linking eat thumbnail to a page ,and on that page the large image links to the sponsor, and also bottom/top of image could put some adverts too.

brassmonkey, thanks, I'll search for Homer's contact info and give him a wassup :)

sent him the thread

pornguy 02-13-2015 10:54 AM

Quote:

Originally Posted by jscott (Post 20391956)
Tom, thanks man, will check it out. The reason I'm asking is, I want to raise my clicks to sponsors for more chance of sales, from linking eat thumbnail to a page ,and on that page the large image links to the sponsor, and also bottom/top of image could put some adverts too.

brassmonkey, thanks, I'll search for Homer's contact info and give him a wassup :)

I wanted to do the same and with a plugin I would. But to try manually is a nightmare.

AdultSites 02-13-2015 01:17 PM

Find it in the database, and change it there.

AmeliaG 02-13-2015 01:24 PM

That would be a cool plugin.

jscott 02-14-2015 08:14 PM

Quote:

Originally Posted by brassmonkey (Post 20392259)
sent him the thread

Thanks a lot man

Quote:

Originally Posted by AmeliaG (Post 20392447)
That would be a cool plugin.

Ya it would, it would save tons of people tons of time! :thumbsup

Quote:

Originally Posted by pornguy (Post 20392284)
I wanted to do the same and with a plugin I would. But to try manually is a nightmare.

Ya man, I wont do it manually, the blog I have has over 3000 posts, so doing manually? i'd rather jump off a cliff lol

Quote:

Originally Posted by AdultSites (Post 20392435)
Find it in the database, and change it there.

Thanks man, whomever I find (if i find) to help out with this, i'll suggest that to him/her, i appreciate the suggestion

VladS 02-14-2015 08:43 PM

You mean to have it by default one or the other or to change it for existing content or both?

jscott 02-14-2015 08:44 PM

Quote:

Originally Posted by VladS (Post 20393481)
You mean to have it by default one or the other or to change it for existing content or both?

for existing content

just a punk 02-15-2015 03:05 AM

Quote:

Originally Posted by AdultSites (Post 20392435)
Find it in the database, and change it there.

Never even touch the WP database directly! Use API to alter it. In this particular case, you need to go through all existing posts, find the gallery shortcodes there and alter them according to this scheme:

[gallery] - linked to attachment
[gallery link="file"] - linked to file
[gallery link="none"] - not linked

Let's consider that all your gallery thumbnails are linked to attachments and you want to make them liked to the actual images. In other words, you have to replace this:

[gallery]

with this:

[gallery link="file"]

I'll show how to do it with the CyberSEO plugin, which almost all GFY's already have.
  1. Go to "CyberSEO->Tools"
  2. Find the "PHP Code <?php .. ?>" box and put there the following code:
  3. Code:

    $post->post_content = str_replace('[gallery]', '[gallery link="file"]', $post->post_content);
  4. Click "Apply These Modifications To All Existing Posts"
  5. Done!

If you want to do the opposite (i.e. make all the thumbnails to link to attachments instead of original images), you should use this code in step #3:

Code:

$post->post_content = str_replace('[gallery link="file"]', '[gallery]', $post->post_content);
Very simple, isn't it? And no special plugins needed :pimp

AdultSites 02-15-2015 04:37 AM

Quote:

Originally Posted by AdultSites (Post 20392435)
Find it in the database, and change it there.

If you have cPanel, go to phpMyAdmin, and figure it out there. If you are not familiar, take time, and read about it on the Internet. Before you make any changes (sql commands), make sure you will be able to go back to the original state, at any time. Before you do anything, create a backup file (.sql) of the database.

AdultSites 02-15-2015 04:46 AM

Quote:

Originally Posted by CyberSEO (Post 20393589)
Never even touch the WP database directly!

He does not need paid CyberSeo plugin to do this.

Tom.K 02-15-2015 05:55 AM

Quote:

Originally Posted by CyberSEO (Post 20393589)
Never even touch the WP database directly!

I often edit wp database directly, either through phpmyadmin, either on sql file dumped locally. and editing in notepad++ or even notepad. never killed any site...

Denny 02-15-2015 06:09 AM

https://wordpress.org/plugins/search-and-replace/

Maybe you would use this plugin to replace the string/shortcode in all the posts?

just a punk 02-15-2015 06:25 AM

Quote:

Originally Posted by Tom.K (Post 20393642)
I often edit wp database directly, either through phpmyadmin, either on sql file dumped locally. and editing in notepad++ or even notepad. never killed any site...

Just a matter of time :winkwink:

VladS 02-15-2015 08:27 AM

If for existing content only, you can run a query to modify the database value for all current items, it's only a matter of looking at the database and identifying what is where and afterwards querying it to set the desired values.

I do agree to what CyberSEO says to some degree, if one doesn't know what to do, shit can hit the fan, but it's common sense that when you modify a database directly, you have the required knowledge to do so.

I'm not a huge fan of WordPress, i usually code my own shit, but from the rare occasions i did work with it, it has indeed the setup that where if one doesn't pay attention when dealing with the database, it can fuck everything up in no time.


All times are GMT -7. The time now is 04:16 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc