Version: 2.00, by EvilLS1
Developer Last Online: May 2021
Version: 3.0.6
Rating:
Released: 01-03-2004
Last Update: 01-24-2005
Installs: 145
No support by the author.
This hack will allow your users to edit their posts without having to load the editpost page..
How it works: In the bottom right-hand corner of all your posts will be a small Quick Edit icon (users will only see it in posts which belong to them).. When you click it a text box will drop down below your post allowing you to edit it instantly in the thread itself.
This will save you a lot of time when fixing those spelling mistakes, typos, or broken links. It should also help save on bandwidth since your users will no longer need to load the editpost page.
Very easy to install.. 2 file edits, 2 template edits, and 1 template to add.
Known bug: Quick Edit will NOT work with Opera web browsers. Those who use Opera simply won't see the option to quick edit (icon will be invisible when viewed in that browser). It'll work fine in other browsers such as IE or firefox.
Support: Due to work my time is limited as of late so this hack is released AS IS with no support. However, several questions have already been answered in this thread.
Update (7-25-04): Fixed a minor bug with the QE window moving further to the left with each click in mozilla/firefox browsers. To update simply replace your showthread_quickedit template with the new one. Thanks to sv1cec for this bug fix.
<if condition="$bbuserinfo['signature'] != ''"> is wrong. It only shows the signature box if the VIEWER has signature. It should show signature box if the poster has signature right? Got this trouble after alloying admin and mod to quickedit.
No, its not wrong. This hack was not designed to let admins and mods use quick edit for editing other people's posts. Thats just an add-on which was requested here. If the hack is used the way it was intended then <if condition="$bbuserinfo['signature'] != ''"> will work flawlessly.
Quote:
In FireFox the box appears somewhere in the middle of the screen. Is there any way to make the corner of it touch the button, just like in IE?
I noticed that too but I have no idea why it does that in firefox.
No, its not wrong. This hack was not designed to let admins and mods use quick edit for editing other people's posts. Thats just an add-on which was requested here. If the hack is used the way it was intended then <if condition="$bbuserinfo['signature'] != ''"> will work flawlessly.
I know. The code I gave above is for people that let admin/mod quick edit.
I think so. You'd just need to copy the necessary code from the editpost template and put it in the showthread_quickedit template. Should be really easy.
no matter where i put the code the quick edit box gets all messed up.... should i put it at the very top of the quick edit template?
Sounds like misaligned table tags. No big deal. Tell ya what.. I should have some free time this weekend so I'll get it working on my test forum and then send you the code.
Sounds like misaligned table tags. No big deal. Tell ya what.. I should have some free time this weekend so I'll get it working on my test forum and then send you the code.
I found the following blocks in the update post section of editpost.php. I think this might give a hint as to how to make quick edit update the moderator log properly, but I'm just guessing.
PHP Code:
// if this is a mod edit, then log it
if ($bbuserinfo['userid'] != $postinfo['userid'] AND can_moderate($threadinfo['forumid'], 'caneditposts'))
{
$string = construct_phrase($vbphrase['post_edited_by_x_on_y_at_z'], $bbuserinfo['userid'], $date, $time);
$modlogsql[] = "($bbuserinfo[userid], " . TIMENOW . ", $threadinfo[forumid], $threadinfo[threadid], $postid, '" . addslashes($string) . "')";
}
Then a little below that:
PHP Code:
// moderator log
if (!empty($modlogsql))
{
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "moderatorlog (userid, dateline, forumid, threadid, postid, action)
VALUES " . implode(', ', $modlogsql)
);
}