scriptygoddess

18 May, 2003

Edit this entry – right now!

Posted by: Jennifer In: MT hacks

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

12 Responses to "Edit this entry – right now!"

1 | patricia

May 19th, 2003 at 12:17 am

Avatar

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.

2 | Doc

May 19th, 2003 at 1:05 pm

Avatar

Of course this is only good for static IPs. I wouldn't wanna try this with a dynamic IP.

3 | jac

May 20th, 2003 at 3:14 pm

Avatar

This is GOOD!

4 | Phoenix

May 21st, 2003 at 8:55 pm

Avatar

Thats the only drawback that I had, I cant use it because Im on dial-up… Im soo desperate for another way…

5 | Neil T.

May 31st, 2003 at 10:09 am

Avatar

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).

6 | Donna

May 31st, 2003 at 5:00 pm

Avatar

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.

7 | Michael Croft

November 12th, 2003 at 12:15 pm

Avatar

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>

8 | Jason Shao

February 16th, 2004 at 4:19 pm

Avatar

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.

9 | LibraryPlanet.com

May 21st, 2003 at 12:55 pm

Avatar

Desktop Applications
A couple of weeks ago, Dave Winer wrote that Radio Userland was much better at doing edit this page functions…

10 | About me

July 16th, 2003 at 7:16 pm

Avatar

mt edit idea
php for an 'edit here' idea. Could be modified to look for cookies!…

11 | idly.org

May 3rd, 2004 at 6:29 pm

Avatar

Edit This Post Authentication Via MT Cookie
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…

12 | joe mullins dot com

May 26th, 2004 at 2:59 pm

Avatar

edit this link movable type cgi-bin madness
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…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements