The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Quick Edit! -Edit posts directly from within the thread itself Details »» | |||||||||||||||||||||||||||
Quick Edit! -Edit posts directly from within the thread itself
Developer Last Online: May 2021
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. Add Ons: *Show the "delete post" option for those who have permission in the Quick Edit form (also adds edit reason). (by sv1cec) *Show the "edit reason" field in the Quick Edit form. (Requested by Convergys) *Alternate Quickedit icon image (by ryancooper) *Another alternate Quickedit icon (by sv1cec) *Another alternate Quickedit icon (by charlesk) *Yet another alternate Quickedit icon (by iguanairs) *Give users the option to disable quick edit in the usercp (by pco) If you find this hack useful please click the install button. Screenshot attached: Show Your Support
|
Comments |
#182
|
||||
|
||||
Clicked install .. works well .. very useful hack
|
#183
|
|||
|
|||
Clicking install, although in the first post I tried to edit (mine, I am the admin, and I have not installed any additional code) it erased the signature. After that it works OK, go figure.
No, the problem is still there. I just tried to edit another old post of mine, and it erased the signature. Can you PLEASE help? Conditions: I am the admin of the forums, I've added no other code except the one of the file in Post #1, I tried to edit an old post of mine and it erased the signature (the Show Singature box was checked but greyed). Then I entered a new post, edit it and it didn't erase the signature (the Show Signature box was checked but not greyed). The I tried to edit another old post of mine, and it erased the signature (again Singature Box checked but grey). I'll do some more investigation and I'll report back if I find something different. It looks consistent, if I try to edit an old post, the Show Signature box comes out checked and greyed. In this case, the signature is deleted. The same thing happends (Show Signature greyed and checked), if the poster didn't have a signature when he entered the post. In this case, it does not enter the signature that the user now has. I'll remove the "Quick Edit" icon from the postbit and postbit_legacy, until we can find a solution. Rgds and Tnx |
#184
|
||||
|
||||
sv1cec,
Very strange. It doesn't seem to be happening on my site. Not sure what could be causing it. Try this and let me know if it still happens: In the QE template find: Code:
<if condition="$bbuserinfo['signature'] != ''"> <label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" checked /><span class="smallfont">Signature</span></label></if> Code:
<if condition="$bbuserinfo['signature'] != ''"> <input type="checkbox" name="signature" value="1" checked /><span class="smallfont">Signature</span></if> |
#185
|
|||
|
|||
Quote:
This seems to fix the problem. The admins post do not loose their signature now, and a user who had a post when he had no signature, can now edit, and the QE hack respects the new condition and adds the signature. The final issue I have, has to do with the location of the window, which opens up for QE. Suppose I have a post and I hit the QE button. Then I cancel it. Then I hit QE again, and the window open a bit further to the left, than the first time. Cancel it again and hit QE again, and the window is almost 50% out of the screen. Something works incrementaly in the location of the window, as far as its horizontal positioning is concerned. On the same issue, if the post's QE button, is too low on your screen, the QE window opens up below the button, so sometimes it hardly appears on the screen. I assume that if this is the case (QE button too far down), the window should open above it, instead of below it. On another issue, could you please update the instructions on the following two issues: - If one wants to give the user the ability to delete his post, what should one add to the showthread_quickedit template? - If one wants to show the QE to people who can moderate and administrate, as well as the poster, what are the changes that need to be made? The ones descrined in post #9, seem to be outdated now. I also do not want to go with the method described in the early stages of this thread, using $bbuserinfo['usergroupid'] ==6 , I'd rather have can_moderate($forum[forumid]). In this case thought, there should be some changes in the signature handling, where $postinfo['signature'] should be used. I am not sure however, where these changes should occur. Any help? Another issue, would it be possible to have a working "Cancel" button. The method of clicking outside the QE box is logical for programmers etc. but not so intuitive for end-users. Plus, sometimes clicking outside the box does not close it (if you click right next to the box, to its left or to its right) and you have to click again, above it or below it, to make it go. Finally, if I may add my 2 Eurocents, I think that the QE button should be just before the Edit button. I think this is a more logical position than between the Quote and the Quick Reply buttons. I also took some time to make a QE button to match the other buttons in the standard vB installation. If you like it you may use it. Have I clicked install? I think I have. Thank you for a nice addition to my forum. |
#186
|
||||||
|
||||||
sv1cec,
Thank you for your suggestions. I will address a few of them now but others will have to wait until the next version as I don't have much time to work on hacks these days. Quote:
Quote:
Quote:
Quote:
Quote:
https://vborg.vbsupport.ru/showpost....3&postcount=95 (also, the first version doesn't seem to have the problem with mozilla where the window opens further to the left every time its clicked, so you may like it better) Quote:
Cool site BTW. The 1911 is my favorite handgun of all time. I have a Colt Gold Cup Trophy and a Combat Commander. |
#187
|
|||||||
|
|||||||
EvilLS1, thanks for coming back to me, I wish all developers here were as prompt as you are. Also, thanks for the nice words on M1911.ORG, appreciated.
As far as the hack is concerned, please read my comments below: Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Well, enough said, I'll work on this tomorrow early in the morning and post accordingly. Again, many thanks for a great hack, appreciated. |
#188
|
|||
|
|||
EvilLS1,
After some experimentation, I have found the following solution for the shifting window problem. In the showthread_quickedit template, find this: HTML Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
HTML Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="left">
In the template, find this: HTML Code:
<td class="tcat" align="left"> <strong>$vbphrase[edit_post]</strong> HTML Code:
<td bgcolor="#3A5383" align="left"> <strong><font color="#ffffff">$vbphrase[edit_post]</FONT></strong> Now, if only we could include the "Delete this post" option, that would be great. Rgds |
#189
|
||||
|
||||
sv1cec,
Nice job! I added your browser fix to the first post (with credit to you, of coarse). As for the "delete this post" option, try this: In functions_showthread.php find: Code:
// End Quick Edit hack Code:
if ($isfirstpost AND can_moderate($thread['forumid'], 'canmanagethreads')) { $show['deletepostoption'] = true; } else if (!$isfirstpost AND can_moderate($thread['forumid'], 'candeleteposts')) { $show['deletepostoption'] = true; } else if (((($forumperms & CANDELETEPOST) AND !$isfirstpost) OR (($forumperms & CANDELETETHREAD) AND $isfirstpost)) AND $bbuserinfo['userid'] == $post['userid']) { $show['deletepostoption'] = true; } else { $show['deletepostoption'] = false; } Code:
<span id="quickedit_$post[postid]"> <img src="$stylevar[imgdir_button]/quickedit_icon.gif" alt="Quick Edit" border="0" /> <script type="text/javascript"> vbmenu_register("quickedit_$post[postid]", true); </script> </span> <div id="quickedit_$post[postid]_menu" style="display:none"> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="left"> <form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="updatepost" /> <input type="hidden" name="p" value="$post[postid]" /> <input type="hidden" name="posthash" value="$posthash" /> <input type="hidden" name="poststarttime" value="$poststarttime" /> <input type="hidden" name="emailupdate" value="9999" /> <input type="hidden" name="disablesmilies" value="0" /> <input type="hidden" name="parseurl" value="1" id="cb_parseurl" /> <input type="hidden" name="iconid" value="$post[iconid]" /> <tr> <td class="tcat" align="left"> <strong>$vbphrase[edit_post]</strong> </td> </tr> <tbody> <tr valign="top"> <td class="panelsurround" align="center"> <div class="panel"> <div align="left"> <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px"> <div>$vbphrase[title]:</div> <div><input type="text" class="bginput" name="title" value="$post[title]" size="60" maxlength="85" tabindex="1" /></div> </div> <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px"> <div>$vbphrase[message]:</div> <div><textarea name="message" class="bginput" style="width:433px; height:125px;" wrap="virtual" tabindex="1">$edittext</textarea></div> </div> </div> </div> <div style="margin-top:6px"> <input type="submit" class="button" name="sbutton" value="Save Changes" accesskey="s" tabindex="1" /> <input type="submit" class="button" name="preview" value="Preview Changes" accesskey="p" tabindex="1" /> <if condition="$bbuserinfo['signature'] != ''"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" checked /><span class="smallfont">Signature</span></label></if> </div> </td> </tr> </tbody> </form> <if condition="$show['deletepostoption']"> <br /> <form action="editpost.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="p" value="$post[postid]" /> <input type="hidden" name="do" value="deletepost" /> <tr> <td class="tcat" align="left"> $vbphrase[delete_this_message] </td> </tr> <tbody id="collapseobj_editpost_delete" style="$vbcollapse[collapseobj_editpost_delete]"> <tr> <td class="panelsurround" align="center"> <div class="panel"> <div style="width:65" align="$stylevar[left]"> <div class="fieldset"> <div>$vbphrase[delete_message_check_appropriate_option]</div> <if condition="$show['firstpostnote']"> <div>$vbphrase[deleting_message_deletion_of_thread]</div> </if> </div> <fieldset class="fieldset"> <legend>$vbphrase[delete_options]</legend> <div style="padding:$stylevar[formspacer]px"> <div> <label for="rb_del_leave"><input type="radio" name="deletepost" value="" id="rb_del_leave" tabindex="1" checked="checked" />$vbphrase[do_not_delete_message]</label> </div> <div> <label for="rb_del_soft"><input type="radio" name="deletepost" value="delete" id="rb_del_soft" tabindex="1" />$vbphrase[delete_message]</label> <if condition="$show['physicaldeleteoption'] AND $show['keepattachmentsoption']">(<label for="cb_keepattachments"><input type="checkbox" name="keepattachments" value="1" id="cb_keepattachments" tabindex="1" />$vbphrase[keep_attachments]</label>)</if> </div> <if condition="$show['physicaldeleteoption']"> <div> <label for="rb_del_hard"><input type="radio" name="deletepost" value="remove" id="rb_del_hard" tabindex="1" />$vbphrase[physically_remove_message]</label> </div> </if> </div> </fieldset> <div class="smallfont"> <div>$vbphrase[reason_for_deletion]:</div> <input type="text" class="bginput" name="reason" size="50" tabindex="1" title="$vbphrase[optional]" /> </div> </div> </div> <div style="margin-top:$stylevar[cellpadding]px"> <input type="submit" class="button" value="$vbphrase[delete_this_message]" tabindex="1" accesskey="s" /> </div> </td> </tr> </tbody> </form> </if> </table> </div> If you'd like, you can tinker with the code and get it looking and working perfectly and then post your own instructions for the add-on here and I'll add a link to your post so that others can add this feature if they want. Or you could even post it in the add-ons section in its own thread. Later, Dewayne |
#190
|
||||
|
||||
Quote:
|
#191
|
|||
|
|||
Dewayne,
Thanks for the input, appreciated. It works OK, as long as the post you try to edit, is not the first one in a thread, which is all right for a normal user (they are not given permission to delete their threads). If it is the first one, it does not even go in the delete form of the template, even though I am the admin, and I just posted that post (no time exceeded). I think it has to do something with the conditionals in the functions_showthread.php. Could you pleeeeease have a look??? Tnx |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|