IPB

Welcome Guest ( Log In | Register )

Movable Type

We're moving to movabletype.org!

At long last, we're moving to forums powered by, well, Movable Type itself. You'll want to bookmark http://forums.movabletype.org/ for future reference, and in the meantime you can view these old forums as a read-only archive of past posts. Thanks for being part of the community!

 
Reply to this topicStart new topic
> Google and robots.txt, Google is indexing blank comments
Chas
post Jul 4 2002, 07:52 PM
Post #1





Group: Members
Posts: 11
Joined: 21-May 02
Member No.: 897



This msg is just to bump the topic up. I sure would appreciate it if anyone with even the slightest opinon on the robots.txt issue would speak up.
Go to the top of the page
 
+Quote Post
Chas
post Jul 6 2002, 02:45 PM
Post #2





Group: Members
Posts: 11
Joined: 21-May 02
Member No.: 897



Wow, that is awesome! Did you write this just for me? I am amazed. It's a mighty fine solution, it never occurred to me that you could split the functions into 2 scripts this way. I thought you could only protect a whole directory with robots.txt, so I learned something new. Thanks.
I think I'll put this in place after doing the 2.11 upgrade, I've been procrastinating, but should get to it this weekend. I'll let you know how it goes.
Go to the top of the page
 
+Quote Post
Chas
post Jul 6 2002, 09:52 PM
Post #3





Group: Members
Posts: 11
Joined: 21-May 02
Member No.: 897



Ah, of course I meant 2.21, that must have been a typo. I'm at 2.11 now.
Go to the top of the page
 
+Quote Post
Chas
post Jun 30 2002, 04:57 PM
Post #4





Group: Members
Posts: 11
Joined: 21-May 02
Member No.: 897



I'm wondering how I can set up my site to be more Googlebot-friendly, and restructure it with protected areas using a robots.txt file. I did some log analysis and it looks like the Googlebot is loading every link, even the comment links where there is no comment yet. I think I should make comments available to Google, but I don't see how to do it without totally shutting down access. If anyone has any advice or strategies for dealing with this, I'd appreciate your input.
I haven't really structured my site properly yet, I need to construct subsections by topics, I need to set up daily archives, and I have to get this all ready for migrating to the new version under MySQL. But I figured I'd better ask before I get into this too deeply. TIA.
Go to the top of the page
 
+Quote Post
philringnalda
post Jul 4 2002, 09:33 PM
Post #5





Group: Members
Posts: 412
Joined: 2-May 02
Member No.: 2,947



Good thing you bumped this. Before, I thought "nothing you can do", but now... this seems to work:

Save this as CommentSwap.pl and upload it to your plugins directory (create one in the same directory as mt.cgi if you don't already have one):
CODE
use MT::Template::Context;
MT::Template::Context->add_tag(CommentSwap => sub {
    my $e = $_[0]->stash('entry')
      or return $_[0]->_no_entry_error('MTEntryCommentCount');
    ($e->comment_count > 0) ? 'mt-comments.cgi' : 'mt-nocomments.cgi';
});
1;


Next, make a copy of mt-comments.cgi and name it mt-nocomments.cgi (and remember to chmod it 755). Then all you have to do is change your comment link to
CODE
<a href="<$MTCGIPath$><$MTCommentSwap$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>

and add mt-nocomments.cgi to robots.txt. Posts without comments link to mt-nocomments.cgi, posts with comments link to mt-comments.cgi.

I love plugins.
Go to the top of the page
 
+Quote Post
akalsey
post Jul 6 2002, 03:24 PM
Post #6





Group: Members
Posts: 232
Joined: 16-January 02
Member No.: 2,418



.
QUOTE
I'll put this in place after doing the 2.11 upgrade


You'll need to use MT 2.2 or higher for the plugin to work


--------------------
...................................
   Adam Kalsey
   Kalsey Consulting Group
   http://kalsey.com/
Go to the top of the page
 
+Quote Post
almuhajabah
post Feb 6 2003, 08:47 PM
Post #7





Group: Members
Posts: 1,865
Joined: 10-July 02
Member No.: 1,372



I assume that something similar to this could be done for empty trackback pop-ups? I've got a lot more of those than empty comments.


--------------------
"Riches does not mean having a great amount of property, but riches is self-contentment." (Prophet Muhammad, peace be upon him)

Al-Muhajabah's Movable Type Tips

Other blogs: Al-Muhajabah's Islamic Blogs - The Niqabi Paralegal - Muslims For Kucinich
Go to the top of the page
 
+Quote Post
faf
post Feb 7 2003, 04:39 AM
Post #8





Group: Members
Posts: 624
Joined: 27-April 02
From: London,UK
Member No.: 1,371



c'mon al, even i can take a stap at this.

See this as an opportunity to write your first plugin.

i'll be watching this. if you dont have athe plugin up by Sunday i'll post it here... or eat my words. tongue.gif


--------------------
dotFAF.com | 24 Hours Just Aint Enough
Go to the top of the page
 
+Quote Post
almuhajabah
post Oct 15 2003, 11:17 PM
Post #9





Group: Members
Posts: 1,865
Joined: 10-July 02
Member No.: 1,372



Faf, you know, I completely forgot about this thread and didn't even check back to see your challenge. huh.gif But it looks like you didn't follow up either, so we're even.

It is pretty straightforward to do. Save the following as TrackbackSwap.pl

CODE
use MT::Template::Context;
MT::Template::Context->add_tag(TrackbackSwap => sub {
  my $e = $_[0]->stash('entry')
      or return $_[0]->_no_entry_error('MTEntryTrackbackCount');
  ($e->ping_count > 0) ? 'mt-tb.cgi' : 'mt-notb.cgi';
});
1;


Make a copy of mt-tb.cgi called mt-notb.cgi and do everything else that Phil instructed. Your new tag is

CODE
<$MTTrackbackSwap$>


--------------------
"Riches does not mean having a great amount of property, but riches is self-contentment." (Prophet Muhammad, peace be upon him)

Al-Muhajabah's Movable Type Tips

Other blogs: Al-Muhajabah's Islamic Blogs - The Niqabi Paralegal - Muslims For Kucinich
Go to the top of the page
 
+Quote Post
WebScud
post Jan 23 2004, 02:16 PM
Post #10





Group: Members
Posts: 19
Joined: 19-September 03
From: East Coast
Member No.: 15,886



Why are there questions marks in the code for the Comments (Lines 3-5) and not for the Trakback? Is that how they're suppose to be, or are they suppose to both have them? Or neither have them?
Go to the top of the page
 
+Quote Post
girlie
post Jan 23 2004, 08:20 PM
Post #11





Group: Super Administrators
Posts: 15,212
Joined: 8-November 01
From: Plano, Texas
Member No.: 1,274



During the forum switch to IPB, some posts got messed up. It looks like the ? were actually just spaces in the code.

I've edited them out.


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 02.09.10 - 10:44 PM