Edit this entry - right now!
This was an item cooked up by Lynda of digitalwoe.com but her original entry appears to be lost and this hack is so handy, I wanted to make sure it was readily available to anyone who wants it. You need to be using PHP to use this - just insert the code in your MT index template after inserting your IP iformation:
<?
$ip = $REMOTE_ADDR;
if ($ip == “IP #1” || $ip == “IP #2“) {
print “<a href=\”<$MTCGIPath$>mt.cgi?__mode=view&_type=entry&id=<$MTEntryID$>&blog_id=<$MTBlogID$>\” target=\”edit\” title=\”For me, not you\”>[edit]</a>”;
}
?>
(replace “IP #1″ and “IP #2″ with your IP address(s) that you want to be able to edit posts from)
Guest authored by:
Donna - deliriouscool.org
May 19th, 2003 at 12:17 am
edit entry :: here’s a non-php version.
and a similar bit of code from the girlie matters to create a link to individual comments edit form. with a little CSS you can even make these ‘invisible’ to the reader.
May 19th, 2003 at 1:05 pm
Of course this is only good for static IPs. I wouldn’t wanna try this with a dynamic IP.
May 20th, 2003 at 3:14 pm
This is GOOD!
May 21st, 2003 at 12:55 pm
A couple of weeks ago, Dave Winer wrote that Radio Userland was much better at doing edit this page functions…
May 21st, 2003 at 8:55 pm
Thats the only drawback that I had, I cant use it because Im on dial-up… Im soo desperate for another way…
May 31st, 2003 at 10:09 am
Couldn’t you just check for a cookie from the site with the user’s login? MT does this already with the search facility (if you selected to ‘Remember me’ and then do a search on the public side, you’ll see [Edit] links by the blog entries).
May 31st, 2003 at 5:00 pm
I guess - there are always different ways to reach the same solution. Care to write a script?
I know I couldn’t which is why I like this method - I know it works, and I don’t have to tweak it.
July 16th, 2003 at 7:16 pm
php for an ‘edit here’ idea. Could be modified to look for cookies!…
November 12th, 2003 at 12:15 pm
This compares the user name that goes in the comments author form to the post author and, if they’re the same, puts in an edit entry link. Only works if the comments user is the same as the author. This could be modified to use the MT cookie.
<script type=”text/javascript” language=”javascript”>
<!–
var MyAuthor = ‘<$MTEntryAuthor$>’;
var ThisUser = getCookie(”mtcmtauth”);
if ((MyAuthor.indexOf(ThisUser) != -1) && ThisUser != ”)
{
document.write(’ <a href=”http://www.whiterose.org/MT/mt.cgi?__mode=view&_type=entry&id=<$MTEntryID$>&blog_id=<$MTBlogID$>”>(Edit)</a>’);
}
;
//–>
</script>
February 16th, 2004 at 4:19 pm
What a great tip. It’ll definitely improve the quality of my editing.
On a side note: it’s sad that comment spam has reached the point where image verification schemes are necessary. Not unwarranted, mind you, but still it’s sad.
May 3rd, 2004 at 6:29 pm
In response to Richard’s inquiry about using the MT user cookie to authenticate a ‘edit this post’ feature, I have a slight hack which provides the solution. As an alternate to IP-based authentication, a hack could be applied to the…
May 26th, 2004 at 2:59 pm
So, recently I decided to add some front end editing tags for MT, so that authors on the MT installs I maintain can just click on a link and be taken to the edit screen within Movable Type. This is…