contributor/ guest/ partner/ syndicated posts and spammy links

directly from google webmaster central blog:

what does violate Google’s guidelines on link schemes is when the main intent is to build links in a large-scale way back to the author’s site. Below are factors that, when taken to an extreme, can indicate when an article is in violation of these guidelines:
* Stuffing keyword-rich links to your site in your articles
* Having the articles published across many different sites; alternatively, having a large number of articles on a few large, different sites
* Using or hiring article writers that aren’t knowledgeable about the topics they’re writing on
* Using the same or similar content across these articles; alternatively, duplicating the full content of articles found on your own site (in which case use of rel=”canonical”, in addition to rel=”nofollow”, is advised)

 

Sites accepting and publishing such articles should carefully vet them, asking questions like: Do I know this person? Does this person’s message fit with my site’s audience? Does the article contain useful content? If there are links of questionable intent in the article, has the author used rel=”nofollow” on them?

 

kk Star Ratings WordPress plugin customization

i needed a voting system for a client’s wordpress website so i installed this plugin: kk Star Ratings

the standard version is great but has very few options. the quickest way to achieve what the client wanted was to customize the plugin a little bit

show voting only for logged in users

i had to replace the voting box with a message inviting the user to login/signup

i edited the file /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

of course you can include HTML code between ‘ ‘ to further edit the message: include a link to login page, change the appearance (float, background)

hide voting on some posts

with kk Star Ratings you can choose where you want the ratings to be placed (homepage, archives, posts, pages, categories) but you can’t hide it from some posts (custom posts in my case)

so i edited the file /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

where 101,151,1001 from the array are the ID’s of the posts

embed flash in HTML / AC_RunActiveContent

in order to embed a flash (swf) animation in a HTML page i use AC_RunActiveContent.js

you can download it from here (it’s a very old file that i’ve been using for years – not sure where i got it from and where to get a new version from 😀 – didn’t need one so far). just right-click on the link and choose save link as (chrome)

upload it to your server

in the head section include this line:

then include this piece of code where you want to show the animation

  • filename is name of the animation file without the .swf extension; you need to change this in 3 places
  • path_to is the path to the file relative to public_html
  • the width and the height are the numbers right after ‘width’ and ‘height’

hide an empty div in google DFP

whenever a Google DFP (DoubleClick for Publishers) ad doesn’t deliver a banner (i.e. not enough inventory, not in the geographic location that you set up) you’ll have an empty blank space instead

to avoid this you’ll have to make a little change in the code

in the first piece of code, the one placed in head, insert this line

before

open and read .p7s files in ubuntu linux

did you receive a doc or docx file with an extra .p7s extension ? it’s a digitally signed document
in order to read it in ubuntu you’ll have to transform it back to the regular .doc or .docx file

here’s how to do this:

  • download the file
  • open a terminal (CTRL+ALT+t)
  • use cd to get to the folder where you downloaded the file

  • copy this line in the terminal (mouse right click) and modify the .p7s file name

now you have the file without the .p7s extension in the same folder you have the original file

include twitter tweets in wordpress

embed a single tweet in an article

just copy / paste the tweet url in the editor and the wordpress will do the rest

it will look like this:

embed a twitter timeline in an article

go to the profile and locate the settings icon (more user actions) and click on the “Embed this Profile” option – like this:

twitter-embed-profile-timeline-1

on this new page you can make a few changes if you want to and click on the Create widget button

copy/paste the code in the wordpress editor – use the text tab. it should look like this:


htaccess setup

permanent (301) redirect

redirect all pages to the root or one page of a new domain

redirect one file:

redirect subdomain to the root domain keeping the url

redirect subdomain to the root domain without keeping the url

 block / disable directory indexing

allow access to only one IP

custom message for 403 access denied

 

 

WordPress Multisite: disable site delete

Once in a while WordPress Multisite admins may have to face the fact that blogs are not forever :)) Some authors may choose to delete their sites from the network.

Once they use the option to delete from the Tools menu they will receive a message like this one:

You recently clicked the ‘Delete Site’ link on your site and filled in a form on that page.

If you want to disable this option and keep your bloggers captive :)) here you go: Disable Site Delete – a plugin that does just what the title says.

From now on your bloggers will have to ask you to delete their blogs as super-admins will be the only ones being able to do it.