Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I set up my site on a PreviewDNS, I have since pointed my Domain to the correct place and changed all the links to non-previewDNS links.

However I can see (using Jetpack) that visitors to my site are somehow able to click on some images (I have the no right click plugin as well as no urls on images)

I do not want people to be able to click on images as they are taken away from the main site and see just the image in a browser window. How can I disable all clicks on the previewdns urls?

The site is www.Hutchisonhaines.co.uk

an example URL is http://hutchisonhaines.co.uk.previewdns.com/wp-content/uploads/2012/01/DSC02296.jpg or http://hutchisonhaines.co.uk.previewdns.com/wp-content/uploads/2012/02/Olly-Murs_2-600x394.jpg

in fact most links clicked are pointing to PreviewDNS site

enter image description here

share|improve this question
    
This problem would probably be solved easier if we had some context. We're going to need to look at the actual site to see the problem. Could you provide the domain? Also perhaps the actual data that Jetpack is giving you: The URL that's being hit. –  Sterling Hamilton Feb 10 '12 at 18:37
    
@Grok Thanks, I have added this additional info. –  Graeme Hutchison Feb 11 '12 at 13:51

2 Answers 2

up vote 2 down vote accepted

It appears that you have content (pages, posts or widgets) that contain old URL information.

An example of a URL that is correct:

http://www.hutchisonhaines.co.uk/wp-content/themes/FactoryWP/style.css

An example of a URL that is incorrect:

http://hutchisonhaines.co.uk.previewdns.com/wp-content/uploads/2012/02/flowers-944x290.jpg

The quickest way to fix this problem would be to do a database dump and then run a search and replace program to find all instances of "hutchisonhaines.co.uk.previewdns.com" and replace them with "hutchisonhaines.co.uk".


I took the liberty of downloading the public version of your site:

wget -r http://www.hutchisonhaines.co.uk/

Then I ran a search to find all instances for you.

You can access the list here:

https://gist.github.com/bfc77ead803e7bbab364


Here are some plugins you can use to do database dumps:

http://wordpress.org/extend/plugins/wp-db-backup/

http://wordpress.org/extend/plugins/wp-dbmanager/

I'm assuming they create the database dump file (it's just a text file) on the server, so you'll need to find out where it puts that file and then download it.

After you download it, perform your search and replace and then upload the new version and tell it to import the database.

I strongly recommend keeping a pristine copy somewhere incase something goes wrong.

share|improve this answer
    
Thanks, this sounds like an ideal solution, how would one go about doing a database dump and do a serach and replace? –  Graeme Hutchison Feb 13 '12 at 15:59
    
Updated the answer. Another possible solution is to ask someone to do it for you if that's an option open to you. It's quite a simple task, but if done wrong can take your site down for a little bit. –  Sterling Hamilton Feb 13 '12 at 17:08
    
Basically all the images were embedded from the preview DNS site, I had to go in and update all the instances in the media library. Thanks for the help. –  Graeme Hutchison Feb 27 '12 at 19:17

Described Behavior: User clicks on a link and is taken away to see the image by itself in a browser window.

Cause: Rather than merely embedding images, you're wrapping images in anchor tags. This is the default behavior of WordPress.

Solution: When you upload images, they are wrapped with a link to the original image file by default. To prevent this behavior, click "None" in the "Link URL" section (highlighted in the screenshot below) when you add your images.

WordPress Media Uploader

You can also edit your older posts in HTML mode to remove the <a href="..."> and </a> wrappings of your images.

A plugin will not do this for you.

share|improve this answer
    
Hi, Thanks, I have already done this, "(I have the no right click plugin as well as no urls on images)" Quite simply, I cant click the images why can others? –  Graeme Hutchison Feb 10 '12 at 18:28
    
If there are no links on the images, then there is nothing for your users to click in the first place. And just because you have a "no right-click plugin" installed doesn't mean people can't get around it. –  EAMann Feb 10 '12 at 18:31
    
That's my thought, there are no links, yet people are somehow getting to the images by clicking the links, as these are showing up in the Jetpack analytics. I know there is no way to protect images, but the majority of everyday visitors to my site will not know that, and disabling right click fends off most. The site is www.hutchisonhaines.co.uk - again thanks for trying to help. –  Graeme Hutchison Feb 10 '12 at 18:33
    
Looking at your site code, there's no way people can get to those links by clicking anything. So anything showing up in Jetpack analytics is coming from somewhere else (some other route) and you should contact Automattic (the people behind Jetpack) directly to diagnose it. –  EAMann Feb 10 '12 at 18:48
    
Thanks for the suggestion, I will contact them to diagnose. –  Graeme Hutchison Feb 11 '12 at 13:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.