Blogercise

  • Home
  • Beginners
    • 1: Topic
    • 2: Name
    • 3: Setup
    • 4: CMS
    • 5: Design
    • 6: Post
    • 7: Promote
    • 8: SEO
    • 9: Money
    • 10: Grow
  • WordPress
    • bbPress
    • Genesis
  • My Plugins
    • bbpress Adsense
  • About
    • Hobby Blogger
    • Cookie Policy
    • Disclaimer

Making user entered links nofollow in e107

Published on Sep 17th, 2009Filed Under: e107, Search Engine Optimisation 5 Comments

I recently found that a number of posters on my netbook site have been posting links to their own blogs, I don’t mind this and have always liked the idea of online communities that link to and support each other. However from time to time it seems that the sites in question are set up with the purpose of making money. I have created such sites myself in the past so I guess I know how to spot them ;)!

There are two problems with this though:

  • These sites often follow rather than lead. So in one example the owner has taken some key points from my own site, summarised them, and posted them up. This doesn’t really push the community forward and in some ways confuses things for users.
  • As a self funding website there is a feeling that such users are just trying to take away the few sales that my site makes to support the running costs (a community site uses up several gb bandwidth a day and plenty of CPU cycles!). As they are not so worried about a community they can push the sales message much harder, there isn’t anything to lose.

I guess it is a competitive world out there, but I don’t want to stop people posting genuine links to their genuine enthusiast blogs whether they have a few ads or no. So I can either start making a judgement and “accuse” these bloggers of spamming, or I can enforce “nofollow” on my forum. This means that enthusiasts aren’t stopped as they will be engaged in the community and posting regularly anyway, but people posting just to get some back links to their site will be put off.

It’s difficult because I have used forums in the past to get my site going. But I think it is easy to spot those who are genuinely engaged in a community and those just trying to make some cash? tbh the netbook market is so competitive now I think there are better places to make some money if that is the only motivation.

Read more….

e107 nofollow links

This was done using e107 0.7. take care when making changes to core files and always back up first. Although I am using these changes I make no guarantees that they will work as expected. Attempt at your own risk.

There are three places where links are generated:

  • e107_files\bbcode\link.bb: The link bbcode is the standard way for users to enter links.
  • \e107_handlers\e_parse_class.php: When posted text is parsed, there is the option to have posted links made clickable. This is another point where user’s can generate links.
  • And finally, it is possible to enter HTML links. In most cases this ability will be restricted to admins only. This is therefore not an issue for me. This also gives the admin the chance to create follow links if needed.

The updates

files/bbcode/Link.bb: I wanted to be able to post follow links myself in the forum, so I added post_info to the global variables, this allows us to tell who owns the current forum post. I am registered as user 1 so in this case the nofollow attribute is not added.


global $pref,$post_info;


      

         if ($post_info['user_id']<>1){$nf = "rel='nofollow'";}

    if (strtolower(substr($link,0,11)) == 'javascript:') return '';

    return "<a class='bbcode' href='".$tp ->        toAttribute($link)."' ".$nf." ".$insert.">".$code_text."</a>";


\e107_handlers\e_parse_class.php:
Users can also post links directly into the forum and the parse function will make these “clickable”. This is a configurable option so you may wish to turn this off if you want to ensure these are nofollow too.

I did plan to investigate a hack to the e_parse_class to ensure all user links were nofollowed here too, but I haven’t got round to looking at this. Watch this space for an update.

Share this:

  • Twitter
  • Google
  • Facebook
  • More
  • Pocket
  • Tumblr
  • LinkedIn
  • Reddit
  • Pinterest
  • Print
  • Email

Related posts:

  1. Adding your new e107 plugin comments to RSS feed
  2. Getting SEO URLs right in e107
  3. How to Upgrade Your e107 Theme
  4. Stop Google from Indexing PDF and Print pages in e107

Filed Under: e107, Search Engine Optimisation Tagged With: e107 Hints and Tips

Comments

  1. roofdog says

    September 18, 2009 at 4:05 pm

    Nice post, could be handy for some, I don’t get too many links posted on my site so its not an issue for me.

    btw… if you set the text wrap for long words in admin >> preferences >> text rendering, it will fix the issues with stuff running out of the menu areas πŸ˜‰

    Reply
  2. jezza101 says

    September 23, 2009 at 12:23 pm

    Ah, thanks for the tip – I’ll have a play πŸ˜€

    Reply
  3. Matt says

    February 9, 2010 at 9:29 pm

    e_parse_class.php

    line: 705

    Change to:
    $_ext = ($pref[‘links_new_window’] ? ” rel=\”external nofollow\”” : “”);

    Matt

    Reply
  4. Arun says

    May 10, 2011 at 11:12 pm

    Interesting post jezza. This post could have saved some of my time spend in researching to accomplish something similar, if I had come across this earlier. In-fact I used a hook e107 already provided(tohtml_hook) to modify the e_parse class. I made it into a plugin and is now available publicly for the e107 community.

    Reply
    • jezza101 says

      May 11, 2011 at 8:46 am

      Hi Arun, actually I noticed that no follow plugin, think I saw it a link on Twitter?! And I thought I had looked at that once.

      I’m afriad I haven’t used e107 for a while so can’t remember all that well how the API fits together!

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About

Blogercise.com the site dedicated to hobby bloggers. If you are an amateur website builder looking to create revenue generating professional quality websites then this site is for you. Find Out More

Google+TwitterRSSWordPress

Get updates via Email

Enter your address to receive occasional emails helping you to become a better hobby blogger:

Recent Posts

  • Renaming A Domain
  • vBulletin to bbPress Migration Missing Topics
  • Vidahost Adds Let’s Encrypt SSL Support
  • WordPress Twitter Plugin: TweetWheel Review
  • How to add Geolocation to a WordPress Plugin

Navigation

  • Advanced
  • Affiliate Marketing
    • SkimLinks
    • SubmitEdge
  • Beginners Guide
    • Start Here
  • e107
  • Internet
  • Mediawiki
  • News
  • PHP
  • Search Engines
    • Search Engine Optimisation
  • Tech
  • Uncategorized
  • vbulletin
  • Wordpress
    • bbPress
    • Genesis
    • Plugins
      • Simple Affiliate Links
      • Simple Amazon Units
      • WPTurbo
    • Thesis

Follow me on Twitter

My Tweets

Our Sites

Pure Pixel - Nexus owner community.
SammyMobile.comSamsung owner community.
Presents UK - Gift ideas.
Redirect Links - Personal link shortener.

Top Posts & Pages

  • Renaming A Domain

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Copyright © 2019 · Metro Pro Theme on Genesis Framework · WordPress · Log in

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
This site uses cookies: Find out more.