vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Quick Edit! -Edit posts directly from within the thread itself (https://vborg.vbsupport.ru/showthread.php?t=54851)

EvilLS1 06-28-2003 10:00 PM

Quick Edit! -Edit posts directly from within the thread itself
 
Hi,

This hack will allow your users to Edit their posts without having to load the editpost page..

How it works: In the bottom lefthand corner of all your posts will be a small "QuickEdit" radio button (users will only see it in posts which belong to them).. When you click it a small text box will instantly drop down below your post allowing you to edit it in the thread itself.
This will save you a lot of time when fixing those spelling mistakes, typos, or broken links.

Very easy to install.. One file edit, two template edits, and one template to add.

Credits: Thanks to T?Pau's javascript add-on this hack now works with Mozilla.


screenshots
View after clicking the QuickEdit radio button:
Screenshot #1

View before button is clicked:
Screenshot #2

Download Quick Edit (Click Here).

Update: For those who prefer an image button instead of a radio button use these instructions.
Note: Image button version does not work with mozilla browsers!

Screenshot of image button version

Also, added a check box for the signature to both versions.

Quick Edit for VB3 can be found here.




If you find this hack useful please click the install button. :)

EvilLS1 06-29-2003 10:25 AM

Screenshots

View after clicking the QuickEdit radio button:

EvilLS1 06-29-2003 10:26 AM

View before button is clicked:

EvilLS1 06-29-2003 10:53 AM

Instructions for those who have already installed my QuickQuote 1 hack:

{edit} These instructions are for those who have already installed the Quick Quote I hack, not Quick Quote II. QuickQuote II users will still need to use the instructions in the first post.

kid_ttvn 06-29-2003 02:38 PM

Oh, nice hack... thank!

Xenon 06-29-2003 04:01 PM

hey, looks nice :)
maybe i should install that one :)

sonic3d 06-29-2003 04:29 PM

worked very nicely. thanx a lot.

l8er
sonic

sphinx 06-29-2003 04:37 PM

very nice m8 ;)

KISS 06-29-2003 04:48 PM

Anyway this could be setup to allow Mods and admins to quick Edit others posts?

EvilLS1 06-29-2003 07:39 PM

Thanks guys.

Quote:

Today at 06:48 PM KISS said this in Post #9
Anyway this could be setup to allow Mods and admins to quick Edit others posts?

Yes, if you want mods and admins to see the QuickEdit option in all posts, in admin/functions.php just use this instead of the code in the instructions:

Code:

if (($bbuserinfo[usergroupid] ==5) || ($bbuserinfo[usergroupid] ==6) || ($bbuserinfo[usergroupid] ==7) or ($post[username] == $bbuserinfo[username])) {
    $edittext = htmlspecialchars($post[pagetext]);

eval("\$quickedit = \"".gettemplate('showthread_quickedit')."\";");
} else {
$edittext="";
$quickedit="";
}


Yapluka 06-29-2003 09:36 PM

This is a very nice hack and my users love it, but clickable smilies in quickreply are not clickable anymore...
Is there a way to make them work ?

Thanks anyway !

EvilLS1 06-29-2003 09:45 PM

Quote:

Today at 11:36 PM Yapluka said this in Post #11
This is a very nice hack and my users love it, but clickable smilies in quickreply are not clickable anymore...
Is there a way to make them work ?

Thanks anyway !


Hmm... Try this.. In the showthread_quickedit template find "vbform" and replace it with "vbulletinform".. Let me know if that fixes it.. I'll update the hack instructions.

KISS 06-29-2003 11:19 PM

Quote:

Today at 04:45 PM EvilLS1 said this in Post #12
Hmm... Try this.. In the showthread_quickedit template find "vbform" and replace it with "vbulletinform".. Let me know if that fixes it.. I'll update the hack instructions.
Nope Doesn't work. Same thing. When you click on a smilie in Quick Reply they no longer work.

Oh, and thanks for the Mod and Admin settings. Works great.

EvilLS1 06-29-2003 11:26 PM

Quote:

Today at 01:19 AM KISS said this in Post #13
Nope Doesn't work. Same thing. When you click on a smilie in Quick Reply they no longer work.

Oh, and thanks for the Mod and Admin settings. Works great.

Ok, I'll look into it more.. Do you by chance have the QuickQuote add on for your Quick Reply box? This could be causing it.

{edit} I just added clickable smilies to my quick reply and its working fine for me.. So I'm guessing that you guys have also installed my quick quote addon for quick reply? And if you did, maybe you forgot to follow these steps in the instructions for the addon?
Quote:

Note: If you have clickable smilies with your Quick Reply you will need to find and replace ALL occurrences of "vbform" with "post" in the following places:
vbcode.js
newreply template
newthread template
vbcode_popup_smilies template

Velocd 06-30-2003 02:55 AM

Nice, more hacks geared toward aiding our laziness ;)

Yapluka 06-30-2003 07:05 AM

Quote:

Today at 02:26 AM EvilLS1 said this in Post #14
Ok, I'll look into it more.. Do you by chance have the QuickQuote add on for your Quick Reply box? This could be causing it.

{edit} I just added clickable smilies to my quick reply and its working fine for me.. So I'm guessing that you guys have also installed my quick quote addon for quick reply? And if you did, maybe you forgot to follow these steps in the instructions for the addon?

No, I didn't install your quick quote at first. I installed then for test and smilies become clickable after all the modifs (you must modify the templates for calendar and private messaging, too).
But it's now quite a long hack to install ;)

EvilLS1 06-30-2003 09:44 PM

Quote:

Today at 09:05 AM Yapluka said this in Post #16
No, I didn't install your quick quote at first. I installed then for test and smilies become clickable after all the modifs (you must modify the templates for calendar and private messaging, too).
But it's now quite a long hack to install ;)

Ah, good catch.. I completely forgot about those two, and also editpost. I updated the post in the other thread.

Shepski 07-01-2003 01:25 PM

great hack. got it installed.

one thing tho, how would i change the code to make it popout instead of to the right but pop out top the left. this is only because I am using a image like the edit and quote ones and want to place it next to the edit and quote buttons in my postbit which are in the same place as the edit and quote on this site. at the mo, if i put the button there it scrolls off the page to the right.

EvilLS1 07-02-2003 02:37 AM

Quote:

Yesterday at 03:25 PM Shepski said this in Post #18
great hack. got it installed.

one thing tho, how would i change the code to make it popout instead of to the right but pop out top the left. this is only because I am using a image like the edit and quote ones and want to place it next to the edit and quote buttons in my postbit which are in the same place as the edit and quote on this site. at the mo, if i put the button there it scrolls off the page to the right.

I wish I could tell ya but I'm really not sure.. I just started playing with javascript last week so its all new to me. Sorry.

Robink 07-02-2003 06:38 AM

Brilliant!!!

It rocks!
My users absolutely love it! QuickHacks are cool ;)

EvilLS1 07-02-2003 07:05 AM

Thanks.. Glad you like. :)

Dean C 07-02-2003 10:41 AM

Good use of JS again ;)

- miSy

dstruct2k 07-02-2003 01:12 PM

A few clicks of the mouse, and a bit of HTML editing for the postbit, and I have this working perfectly! Awesome hack! Simple install, and amazingly simple to use.

gulldarek 07-02-2003 01:19 PM

lol, great hack

/me clicks install

Guru360 07-02-2003 06:57 PM

Nice hack, I have lots of lazy members lol

EvilLS1 07-03-2003 05:31 AM

Thanks. :)

[Fx]AssAssiN 07-03-2003 06:07 AM

very nice! :classic:
/me clicks install

T?Pau 07-05-2003 04:51 PM

Quote:

06-29-03 at 01:21 PM EvilLS1 said this in Post #1

Known issues: This doesn't work with mozilla browsers.. Clicking the QuickEdit button simply won't do anything. It works fine with Internet Explorer and Opera.

[high]* T?Pau is a Mozilla Fan ....
[/high]
...so I made this Java Script working in Mozilla

PHP Code:

<script type=text/javascript>
function 
toggleT(_w,_h) {
if(
document.getElementById) { //This for Mozilla
if (_h=='s') eval("document.getElementById(_w).style.visibility='visible';");
if (
_h=='h') eval("document.getElementById(_w).style.visibility='hidden';");
}
if (
document.all) { // is IE
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (
_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
}
else { 
// is NS? 
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (
_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
}
</
script

But I have a Problem in Opera. The Box opens and when I try to safe the changes, it loads an empty side.

Hazzz-E 07-05-2003 06:36 PM

Thanks man

this is a great hack

EvilLS1 07-05-2003 09:07 PM

T?Pau,
I just tested your code with Opera 7 and it works fine for me.. Also works with Mozilla now. Good job! With your permission I'd like to update the hack instructions and add your javascript for mozilla. I'll give credit to you for that in the main post of coarse. Let me know. :)

larryd 07-06-2003 07:02 PM

Ok seems Im the only one to run into problems, hopefully you can help me out.

Forums are at http://www.newcelica.org/forums/index.php

I followed all the instructions and when I try and click the radial it gives me a javascript error on the bottom of the page stating

Line 711
Char 1
Error Object Expected
Code 0
URL http://www.newcelica.org/forums/show...postid=1219521

Nothing actually pops up to edit anything. Im not sure what the problem is, figure it might have something to do with the quick quote that Im using. Im running your QuickQuote II.

PhoenixBB 07-06-2003 11:22 PM

I'm having this problem too! I'm running Quick Quote II without problem, and I used the instructions for the QQ users.

I'm using IE6 and VB 2.26 if that's any help.

Thanx

EvilLS1 07-06-2003 11:31 PM

Ok, I think thats whats causing your problem then. Those instructions are for people who installed my first QuickQuote hack (not Quick Quote II).. Sorry about that, I should have been more clear about it. Follow the instructions in the first post and it will work for you.

larryd, did you also use those instructions? If not, what browser are you using? Make sure you added the javascript to the headinclude template..

PhoenixBB 07-06-2003 11:48 PM

Still didn't work - until I put the JS in the headinclude (you'd said to skip that if one had QQ installed). Working fine now. :)

Great hacks!

Thanx

EvilLS1 07-06-2003 11:54 PM

Quote:

until I put the JS in the headinclude (you'd said to skip that if one had QQ installed).
Yeah I meant if you had QQ1 installed (there's 2 quick quote hacks).. Anyway, sorry about that.. Guess I should have explained it more clearly. I updated the instructions so not to confuse anyone else. Glad its working for ya now. :)

larryd 07-07-2003 02:32 AM

Thats what it was, I did not add the script into the headinclude. That would make alot of sense huh :) THANKS and great hack.

PhoenixBB 07-07-2003 08:42 AM

Ooh, I think I found a bug! Well maybe not a bug, but a little problem. Or big one, depending on your board setup......

I have one forum on my board that allows guests to post - basically in case it's a member with problems or someone having probs registering. Anyway, I was having a look thru that forum just now - logged out - and there is one post there by an Unregistered (actually a member who forgot to log in). I was intrigued to see the quick edit button there. So I clicked it and ya, up the box popped! So I guess, the unregistered will be able to edit each others posts. :eek:

Not a major problem from my standpoint as guests rarely post there, and I can switch off the access so they can email me if they have tech probs. I should imagine for people with boards that allow guests to post it would be a bit of a problem though.

Have I mentioned how much I love this hack?? It's saving me a ton of time! :)

PhoenixBB 07-07-2003 08:48 AM

Ah, might not be as bad as it looks. Just edited said post but I got the No Permissions page - which is interesting as Guests do have permission to post there. Maybe because Guests can't edit their posts? Hmmm. I can't see how it would know who the original guest was, so I'm guessing in spite of the edit button and box coming up that Guests posts can't be edited via the quick edit? Cool. Be amusing to watch people try. ;)

EvilLS1 07-07-2003 08:58 AM

Yeah all the same permissions in editpost.php still apply. :) If you want the quick edit button to be invisible to unregistered posters just use this code in admin/functions.php instead of the code you added from the instructions.

Code:

if ($post[username] == $bbuserinfo[username] and $bbuserinfo[userid] !=0) {
    $edittext = htmlspecialchars($post[pagetext]);

eval("\$quickedit = \"".gettemplate('showthread_quickedit')."\";");
} else {
$edittext="";
$quickedit="";
}


DelFDgfd_gT 07-07-2003 08:11 PM

I cant click my post reply button anymore. wtf?


All times are GMT. The time now is 06:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01307 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete