Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Changing links to DoFollow from NoFollow after getting 5 or 10 Votes

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default Changing links to DoFollow from NoFollow after getting 5 or 10 Votes

    Hi
    I am not sure how this can be done....

    I want to change links to source article to DoFollow once that post receive 5 or 10 positive votes!
    Which means the default NoFollow attribute should change to DoFollow for those specific posts...

    Can this be done?

    Thanks in advance

  2. #2
    Senior Member
    Join Date
    Jun 2011
    Posts
    122
    Thanks
    5
    Thanked 16 Times in 10 Posts

    Default

    Hi

    I think its possible... The nofollow attributes are hardcoded to the bookmarking files, I think.

    So you would have to add a sql-query, which checks the votes the post have, then echo the statement you want.

    But I do not know how caching acts with this...

  3. Thanked by:


  4. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Thanks...
    But, how exactly do achieve this? I am not an expert
    So, probably you guys need to put some light on this ...

  5. #4
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    Find this line in bookmarking_post.php
    PHP Code:
           <?php if (!$h->vars['editorial']) { ?> 
                <a href='<?php echo $h->post->origUrl?><?php echo $h->vars['target']; ?> class="click_to_source" rel="nofollow"><?php echo $h->post->title?></a>
    Replace it with:
    PHP Code:
           <?php if (!$h->vars['editorial']) { 
           if ( 
    $h->post->post_votes_up $rel ''// Use whatever vote count you want
          
    else $rel 'rel="nofollow"';
    ?> 
                <a href='<?php echo $h->post->origUrl?><?php echo $h->vars['target']; ?> class="click_to_source" <?php echo $rel ?>><?php echo $h->post->title?></a>

  6. Thanked by:


  7. #5
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Thanks a ton PuckRobin - Just changed this as you said. looks pretty neat

    BTW: I cannot see rel=nofollow attribute when checked using FireBug! Whereas it should I guess... Isn't it?

  8. #6
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    You should see it. Don't forget to clean your server side Hotaru cache.

  9. Thanked by:


  10. #7
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Okay! I did but couldn't see...
    However, will wait for some time before I clear CloudFlare cache as well.
    Will update again.

  11. #8
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    I tried but the only thing I see for any link including with 4+ votes is : class="click_to_source"
    Am I missing anything?

  12. #9
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    Probably. Show us some link.

  13. #10
    Junior Member
    Join Date
    Feb 2012
    Posts
    26
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by PuckRobin View Post
    Probably. Show us some link.
    Here is a link to main site.

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Is hotaru Dofollow or Nofollow?
    By azhar4546 in forum How-To and Troubleshooting
    Replies: 1
    Last Post: 10-02-2011, 12:54 AM
  2. NOFOLLOW/DOFOLLOW links HELP NEEDED
    By drvosjeca in forum How-To and Troubleshooting
    Replies: 1
    Last Post: 06-20-2011, 11:01 AM
  3. Making external links count as votes
    By baadier in forum How-To and Troubleshooting
    Replies: 6
    Last Post: 08-25-2010, 08:01 AM
  4. Changing default for opening links in a new tab
    By Nick in forum How-To and Troubleshooting
    Replies: 0
    Last Post: 01-12-2010, 04:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •