PDA

View Full Version : Quick Edit! -Edit posts directly from within the thread itself


EvilLS1
06-28-2003, 10:00 PM
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 (https://vborg.vbsupport.ru/attachment.php?attachmentid=13866)

View before button is clicked:
Screenshot #2 (https://vborg.vbsupport.ru/attachment.php?attachmentid=13867)

Download Quick Edit (Click Here). (https://vborg.vbsupport.ru/attachment.php?attachmentid=14415)

Update: For those who prefer an image button instead of a radio button use these instructions (https://vborg.vbsupport.ru/showpost.php?s=&postid=425572).
Note: Image button version does not work with mozilla browsers!

Screenshot of image button version (https://vborg.vbsupport.ru/attachment.php?attachmentid=14348)

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

Quick Edit for VB3 can be found here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=59629).




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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=54759) hack, not Quick Quote II (https://vborg.vbsupport.ru/showthread.php?s=&threadid=54939). 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.

Today at 06:48 PM KISS said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=413922#post413922)
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:


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
Today at 11:36 PM Yapluka said this in Post #11 (https://vborg.vbsupport.ru/showthread.php?postid=414006#post414006)
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
Today at 04:45 PM EvilLS1 said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=414010#post414010)
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
Today at 01:19 AM KISS said this in Post #13 (https://vborg.vbsupport.ru/showthread.php?postid=414031#post414031)
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?

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
Today at 02:26 AM EvilLS1 said this in Post #14 (https://vborg.vbsupport.ru/showthread.php?postid=414032#post414032)
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
Today at 09:05 AM Yapluka said this in Post #16 (https://vborg.vbsupport.ru/showthread.php?postid=414107#post414107)
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
Yesterday at 03:25 PM Shepski said this in Post #18 (https://vborg.vbsupport.ru/showthread.php?postid=414467#post414467)
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
06-29-03 at 01:21 PM EvilLS1 said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=413851#post413851)

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.

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

<script type=text/javascript>
function toggleT(_w,_h) {
if(document.getElementById) { //This for Mozilla
if (_h=='s') eval("document.getElementById(_w).style.visibility='visi ble';");
if (_h=='h') eval("document.getElementById(_w).style.visibility='hidd en';");
}
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/showthread.php?s=&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
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.


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?

DelFDgfd_gT
07-07-2003, 08:15 PM
This ++++ right here doesnt allow me to post repliers using the post reply button. again, another bug with your hack.


#### In your postbit template find:


<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>


#### Replace with:


<TABLE height=0 cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD>$quickedit </td>
<TD align=right><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></TD></TR></TBODY></TABLE>


Please fix this! And fix your Quick Quote II hack also.

T?Pau
07-07-2003, 08:33 PM
Yesterday at 12:07 AM EvilLS1 said this
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. :)
Sure no problem :)

But still Opera loads the newrepy.php not the editpost.php, when I click the Submit button. The form action goes to editpost.php and Mozilla & IE are both working. Any idea why this happenes ?
-->http://star-trek-galaxy.net/forums/forumdisplay.php?s=&forumid=7

EvilLS1
07-07-2003, 09:02 PM
T'Pau,
Thats strange because it should go to editpost.php with any browser as long as the form action says action="editpost.php". Which version of Opera are you using? Its working fine for me with Opera 7.

Ramsy, check my reply to your post in the Quick Quote thread. You did add the javascript to the headinclude template correct?

EvilLS1
07-07-2003, 09:28 PM
T'Pau,
I went to your forum and viewed the page source in one of your threads.. I found this at the top (above the messages):


<form action="newreply.php" method="POST">
<input type="hidden" name="s" value="ab85079a3d8c5a772a701d7972966aca">
<input type="hidden" name="threadid" value="1036">


And then the closing tag </form> for this form is at the bottom of the page..

What I can't figure out is why you have a newreply form that starts at the top of the page.. Unless its from another hack that you've installed. I think this is whats causing your problem..

{edit} I think I know why that form is there. I bet you have the Quote multiple posts hack (by xiphoid) installed .. If so, thats whats causing it to go to newreply instead of editpost in Opera. The quote multiple posts hack adds a form around the entire section that contains the messages.. This hack places a hidden form in each postbit.. You can't embed a form inside of another one, so I'm pretty sure thats whats causing it.

To test it, just temporarily remove this bit of code from the showthread template:

<form action="newreply.php" method="POST">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="threadid" value="$threadid">

DelFDgfd_gT
07-09-2003, 04:28 AM
removing the multi quote hack worked, thanks, installed.

DelFDgfd_gT
07-09-2003, 06:49 AM
Hey dude, How can I make it so that QuickEdit
is under Quick Reply?

EvilLS1
07-10-2003, 03:14 AM
Yesterday at 08:49 AM Ramsy de Vos said this in Post #46 (https://vborg.vbsupport.ru/showthread.php?postid=416359#post416359)
Hey dude, How can I make it so that QuickEdit
is under Quick Reply?

I don't think thats possible. The form has to be in the postbit.

PhoenixBB
07-11-2003, 11:44 PM
Is it possible that this (or the quote hack I installed before it) could in some way interfere with the Options settings? I can't see how they could, but since installing these 2 I've noticed a few probs on the board getting logged out etc. I checked my Options, and the Browse board with cookies had mysteriously been turned off. I reselected it and saved, but it keeps reverting to No. It's fine in the AdminCp panel btw. I can't see how either of these hacks could have such an effect, but the problem only cropped up after installing so I wondered if there was a connection.

Anyone else had this, and knows how to fix it?

Thanx.

EvilLS1
07-11-2003, 11:57 PM
Today at 01:44 AM PhoenixBB said this in Post #48 (https://vborg.vbsupport.ru/showthread.php?postid=417063#post417063)
Is it possible that this (or the quote hack I installed before it) could in some way interfere with the Options settings? I can't see how they could, but since installing these 2 I've noticed a few probs on the board getting logged out etc. I checked my Options, and the Browse board with cookies had mysteriously been turned off. I reselected it and saved, but it keeps reverting to No. It's fine in the AdminCp panel btw. I can't see how either of these hacks could have such an effect, but the problem only cropped up after installing so I wondered if there was a connection.

Anyone else had this, and knows how to fix it?

Thanx.

Hmm.. Thats strange, but I don't think this hack could effect those settings.. I've been using it on my board for a few weeks now and haven't had any problems like that. You could try uninstalling it and see if the problem goes away, but I highly doubt this is causing it.

PhoenixBB
07-12-2003, 12:12 AM
Uninstall it?? No chance! ;)

Think this has to be one of my favourite hacks, so not ever uninstalling it, even if everybody kept getting logged out. :D

Didn't think it could be this though, so it's just probably one of those weird things that happen from time to time.

EvilLS1
07-12-2003, 12:23 AM
Hehe.. I just meant temporarily uninstall it to see if the settings problem goes away. Glad you like it though. :)

GenSec
07-15-2003, 11:26 AM
Very nice. I like it.

Exo
07-15-2003, 01:06 PM
thanks very nice hack :bunny:

how can i set it so that the thread starter can not see the quick edit button?

EvilLS1
07-16-2003, 05:24 AM
Thanks.


how can i set it so that the thread starter can not see the quick edit button?

Not sure if thats possible without adding a query.

Sn00peh
07-18-2003, 01:12 PM
did anyone try this with 2.3?

Parker Clack
07-18-2003, 01:46 PM
Great hack! My members already love it.

I changed the input code in the showthread_quickedit template

from:

<input name="r2" type="radio" value="" onClick="toggleT('e$post[postid]','s')"><smallfont>QuickEdit</smallfont>

to:

<input name="r2" type="button" style="font-face:verdana;font-size:12px" value="Quick Edit" onClick="toggleT('e$post[postid]','s')">

and

from:

<input name="r2" type="radio" checked value="" onClick="toggleT('e$post[postid]','h')"><smallfont>Hide</smallfont>

to:

<input name="r2" type="button" checked value=" Close Box " onClick="toggleT('e$post[postid]','h')">

I like buttons better for some reason. :)

Thanks for the great hack.

Parker

EvilLS1
07-18-2003, 10:16 PM
Sn00peh, I'm pretty sure this will work fine with 2.3.0 .

Parker, y/w. glad you like it. :)

Robink
07-19-2003, 05:32 AM
Im on 2.3.0 and it works beautifully.

Parker Clack
07-19-2003, 02:31 PM
I have a Spellcheck script that I use that can be put into any form on a web site. I use it with the regular edit function, the new reply and new thread on the forum.

<form name="spell">
<script>
function sendtext() {
var semi = new RegExp("\;","g");
document.send.checkme.value = (document.vbulletinform.edittext.value.replace(sem i,"\;"));
document.send.form.value = "vbulletinform";
document.send.field.value = "edittext";
window.open('','SpellChecker','width=640,height=48 0,scrollbars=1,location=true') ;
document.send.submit();
}
</script>
<input type="button" name="SpellCheck" value="Spell Check" onclick="sendtext()" class="bginput" tabindex="5" accesskey="c">
</form>
<form name="send" action="/cgi-bin/spell.pl" method="POST" target="SpellChecker">
<input type="hidden" name="checkme">
<input type="hidden" name="form">
<input type="hidden" name="field">
<input type="hidden" name="spell" value="check">
</form>

Is there anyway to incorporate this into this hack? I have tried but when I use it it doesn't work and just generates an error.

Thanks,
Parker

EvilLS1
07-19-2003, 10:48 PM
Try this..

In your spell checker form find:

document.send.checkme.value = (document.vbulletinform.edittext.value.replace(sem i,"\;"));


Raplace it with:

document.send.checkme.value = (document.vbulletinform.message.value.replace(semi ,"\;"));


Find:

document.send.field.value = "edittext";


Replace it with:

document.send.field.value = "message";


Or if that doesn't work use this instead:

document.send.field.value = (document.vbulletinform.message.value);



If that doesn't work just post the javascript error message and we'll try to figure it out.

Parker Clack
07-20-2003, 07:04 AM
Thanks. I will give this a try. The error message that I have been getting is the one that you see at the bottom of your browser that says "Done. Errors on the page" and the script doesn't run.

I will try your suggestions and let you know.

Parker

Parker Clack
07-20-2003, 07:19 AM
Well, I tried your suggestions but the script still fails to load and I get the "Error on page" line at the bottom left of my browser.

Parker

EvilLS1
07-20-2003, 07:26 AM
Hmm.. I don't know much about how the spellchecker works but if you'll open the page with a Mozilla browser then click tools, web development, & javascript console it will tell you the exact error and maybe you can get an idea of how to fix it. I suspect its something to do with the form names or textarea names not matching. Just out of curiousity where are you placing the spell checking form? I'm guessing either in the headinclude template or in the showthread_quickedit template?

Parker Clack
07-21-2003, 01:29 AM
I am using the showthread_quickedit template

So it looks like

<input name="r2" type="button" checked value=" Close Box " onClick="toggleT('e$post[postid]','h')" style="font-face:verdana;font-size:13px">
<form name="spell">
<script>
function sendtext() {
var semi = new RegExp("\;","g");
document.send.checkme.value = (document.vbulletin.message.value.replace(semi,"\;"));
document.send.form.value = "vbulletin;
document.send.field.value = "message";
window.open('','SpellChecker','width=640,height=48 0,scrollbars=1,location=true') ;
document.send.submit();
}
</script>
<input type="button" name="SpellCheck" value="Spell Check" onclick="sendtext()" class="bginput" tabindex="5" accesskey="c">
</form>
<form name="send" action="/cgi-bin/spell.pl" method="POST" target="SpellChecker">
<input type="hidden" name="checkme">
<input type="hidden" name="form">
<input type="hidden" name="field">
<input type="hidden" name="spell" value="check">
</form>
</td>

That is the way that I have it incorporated in my newthread, newreply templates and it works great.

Thanks

Pikok
08-01-2003, 05:55 AM
Hello there, I have QuickQuote II installed, all fine. but I cant get the QuickEdit shown up correctly 'cus of my style set. It's the vbulletin exposed. I'll add a pic + my code. If you guys could help me out I'd appreciate it alot :)

<TABLE height=0 cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD>$quickedit </td>
<TD align=right><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Warn</a></smallfont></TD></TR></TBODY></TABLE>

EvilLS1
08-01-2003, 11:53 PM
Try placing the $quickedit variable somewhere below the signature in the postbit template. I haven't used or even seen that style but its just simple html, so if you'll experiment with it a little I'm sure you can find a good place to put it.

Larry@IOG
08-02-2003, 12:36 AM
When I save the changes my page goes to http://www.impulseownersgroup.com/vb/newreply.php and does not reload the changes. Also it does not make any changes


Larry

EvilLS1
08-02-2003, 12:54 AM
Larry,
This is most likely due to a conflict with another hack that you've installed. Do you by chance have the "quote multiple posts" hack by xiphoid installed on your board? If so, thats whats causing your problem.

Try this:

At the top of your "showthread_quickedit" template add this:

</form>


Still in the showthread_quickedit template, add this at the bottom:

<form action="newreply.php" method="POST">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="threadid" value="$threadid">


That should make this hack compatible with the other one.

Larry@IOG
08-02-2003, 03:02 AM
That was the problem thanks a ton

Larry

Pikok
08-02-2003, 04:38 AM
Today at 01:53 AM EvilLS1 said this in Post #66 (https://vborg.vbsupport.ru/showthread.php?postid=422499#post422499)
Try placing the $quickedit variable somewhere below the signature in the postbit template. I haven't used or even seen that style but its just simple html, so if you'll experiment with it a little I'm sure you can find a good place to put it.


thanks, I added the whole code where the $quickedit was right under the $signature and it works fine :)

EvilLS1
08-02-2003, 07:24 PM
n/p. Glad its working for ya.

Larry@IOG
08-03-2003, 12:46 AM
Thanks for the help.

But my post reply button is not working

Larry

Larry@IOG
08-03-2003, 12:47 AM
No thread specified. If you followed a valid link, please notify the webmaster

That is the messgage I am getting

Larry

EvilLS1
08-04-2003, 12:36 AM
Larry,
Sorry to hear that, but thats also due to a conflict with the quote multiple posts hack. I thought maybe there was a way to make them work together but I guess these two hacks just aren't compatible. The reason is because the quote multiple posts hack puts all messages inside of a form.. and this hack puts a single form in the postbit if the post belongs to the person viewing the thread. You cannot embed a form inside of another form so thats why its not working.

I have another hack that allows you to quote multiple posts instantly in your quick reply box and it doesn't conflict with Quick Edit. If you want to take a look it can be found here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=54939).

PurpleCow
08-04-2003, 01:58 AM
EvilLS1 - I wanted to install some of your hacks and i did install too.

I wanted quickEdit, QuickQuoteII, QuoteSelected.

I first installed quickedit, then QuickQuoteII, then realised it requires FireFly's Quick Reply ( installed that too. But at last, I tried installing QuoteSelected, but the last one isn't working. That after installing QuoteSelected, even QuickQuoteII gives me Javascript errors ( in my status bar ). Also QuickQuoteII doesn't work now. How do i go about installing all 3 hacks of yours without and get them to work.

I have installed it on vB2.3.0 stable release !

Thanks

EvilLS1
08-04-2003, 02:14 AM
HostBubble,
Did you follow the special instructions posted here (https://vborg.vbsupport.ru/showthread.php?postid=414628#post414628)? If not, replace the entire contents of the quickquote template with the quickquote template html in those instructions.


Then check and make sure that the name of your quick reply form is "post". It should look like this:

<form enctype="multipart/form-data" action="newreply.php" name="post" method="post" onSubmit="return validate(this)">

PurpleCow
08-04-2003, 02:27 AM
Okay, the second part, that method=post is correct, i just now checked.

But my problem is that. I installed your 3 hacks using the instructions in the first posts, without noticing the If u have installed, the instructions are different txt files. But even after that, i checked and compared files manually....the instructions in the first posts and the instructions to install a file, if other hack is installed seems to be the same.

That is my problem. kindly tell me, if i should want to install
QuickQuoteII
QuoteSelected
QuickEdit

what is the order in which, i should install and what instructions should i follow. I am just a bit confused.

Thanks

PurpleCow
08-04-2003, 03:02 AM
Okay, i got all the 3 of them working now. I just had to make a minor change.

Thanks a lot for the hacks.

Cheers

EvilLS1
08-04-2003, 10:30 PM
y/w. glad ya got it working.

PurpleCow
08-08-2003, 02:01 PM
Instead of radio button, do u have the image version for this quick edit hack ??

Thank you

EvilLS1
08-09-2003, 02:37 AM
Yesterday at 04:01 PM PurpleCow said this in Post #80 (https://vborg.vbsupport.ru/showthread.php?postid=424329#post424329)
Instead of radio button, do u have the image version for this quick edit hack ??

Thank you

Find this:

<input name="r2" type="radio" value="" onClick="toggleT('e$post[postid]','s')"><smallfont>QuickEdit</smallfont>


Replace with this:

<a href="javascript:return false;" onClick="toggleT('e$post[postid]','s')"><img src="http://www.yoursite.com/forums/images/quickedit.gif" border="0"></a>

Change the URL in the code above to the path to your image directory. Then upload the image for the button (name it quickedit.gif). I didn't test it but it should work.

PurpleCow
08-09-2003, 04:18 AM
hello,

This works fine, but a minor problem is what i have.

Like, when i click on the image in the post, the window opens up...there the hide radio button is already selected, which should not be so. How can make it so that the Hide option is not selected by default.

Inspite of working fine, it gives me java script erros, how can i avoid showing those java script erros in the status bar.

Thanks for any help.

EvilLS1
08-11-2003, 12:47 AM
You could use a regular button instead of the "hide" radio button to solve the problem.

Find this:

<input name="r2" type="radio" checked value="" onClick="toggleT('e$post[postid]','h')"><smallfont>Hide</smallfont>


Replace it with this:

<input name="r2" type="button" value="Hide" onClick="toggleT('e$post[postid]','h')">


As for the javascript error, try using this for the image button and maybe it'll fix it.


<a href="java script:return false;" onClick="toggleT('e$post[postid]','s') return false;"><img src="http://www.yoursite.com/forums/images/quickedit.gif" border="0"></a>

PurpleCow
08-11-2003, 12:49 PM
Okay, the Hide problem is solved.

But replacing the new code for image still has problem. When i replace it with the new code in your previous post, and check for the functionality, i get a page not found error when i clcik on the image. Also, when the page load, i get java script errors.

Thanks for any help.

cheers

Today at 08:17 AM EvilLS1 said this in Post #83 (https://vborg.vbsupport.ru/showthread.php?postid=425046#post425046)
You could use a regular button instead of the "hide" radio button to solve the problem.

Find this:

<input name="r2" type="radio" checked value="" onClick="toggleT('e$post[postid]','h')"><smallfont>Hide</smallfont>


Replace it with this:

<input name="r2" type="button" value="Hide" onClick="toggleT('e$post[postid]','h')">


As for the javascript error, try using this for the image button and maybe it'll fix it.


<a href="java script:return false;" onClick="toggleT('e$post[postid]','s') return false;"><img src="http://www.yoursite.com/forums/images/quickedit.gif" border="0"></a>

EvilLS1
08-12-2003, 09:02 PM
PurpleCow,
My bad, I made a mistake in the code above. Try this instead:

<a href="java script:return false;" onClick="toggleT('e$post[postid]','s'); return false;"><img src="http://www.yoursite.com/forums/images/quickedit.gif" border="0"></a>


I tested that on my own forum and it works fine.

{edit} I just noticed that the image button version will not work with mozilla type browsers. So if thats what you're using you should stick with the radio button version.

EvilLS1
08-12-2003, 10:55 PM
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!

Also, both versions now have a check box to include the signature.

EvilLS1
08-12-2003, 10:56 PM
Screenshot of image button version:

PurpleCow
08-13-2003, 02:36 AM
EvilLS1 - Thanks for the zip file. I have a question before, i proceed with the image version installation.

Now, if i want to install image version, do you recommend un-installing the radio button version and then proceed with image version ?? or much of it remains same excepting a few changes ??

And yes, I am using IE6 and not mozilla. I am also testing it on IE6 only.

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

You had mentioned this in your instructions file. Okay, i guess the radio button version allows only mods and/or admin to quick edit a post, but does this new image version allows even a registered member to edit their post ??

Thank you very much for your valuable time.

EvilLS1
08-13-2003, 06:45 PM
The code in functions.php is the same, but you'll need to remove the radio button version's changes to the postbit template and then replace the whole showthread_quickedit template with the html in the instructions above.


You had mentioned this in your instructions file. Okay, i guess the radio button version allows only mods and/or admin to quick edit a post, but does this new image version allows even a registered member to edit their post ??

No both versions will allow all registered users to edit their posts via the quick edit feature. You can easily set it up so that only admins and/or mods can use it if you want.

PacknCanes
08-22-2003, 02:39 AM
Quick fix for something that screwed up my computer but apparently is sporadic:

Find "<script type=text/javascript> " in your headinclude template and change it to "<script language="JavaScript"> ".

For some reason my computer was processing the text/javascript command as an infinite loop and it caused my CPU usage to skyrocket to 100% and stay there till I loaded another page. Not sure if this will affect anyone else, but if it hit me it may hit someone else, so it's worth a shot to change. No functionality of the hack is changed by editing that line, for the record.

EvilLS1
08-22-2003, 08:22 PM
PacknCanes,
Thanks. It doesn't do that on my computer but I'll update the instructions just incase.

Red Blaze
10-07-2003, 05:24 PM
Works great! My board's members are quite lazy, as I am too. ^^;

/me installs!

Pickalo
12-19-2003, 05:09 AM
Thanks man, this is a great hack and I clicked install :)

EvilLS1
12-20-2003, 11:55 PM
Thank you. :)

gmarik
12-21-2003, 07:17 AM
Wonder!

jaliam
01-09-2004, 07:28 PM
This is a very good hack, guys! Thanks so much.

David Bott
01-16-2004, 09:40 PM
Does this not use all the post data twice? I mean...When you pull up the thread with all the posts, does it not have all the post data twice? One for the display and one just in case the QuickEdit is clicked? I mean I like this hack a lot and have it installed, but would it not been nicer to hit the DB if someone clicks on QuickEdit to pull just that posts data when using the feature? Think of the bandwidth increase.

Thanks.

EvilLS1
01-16-2004, 11:25 PM
Does this not use all the post data twice? I mean...When you pull up the thread with all the posts, does it not have all the post data twice? One for the display and one just in case the QuickEdit is clicked? I mean I like this hack a lot and have it installed, but would it not been nicer to hit the DB if someone clicks on QuickEdit to pull just that posts data when using the feature? Think of the bandwidth increase.

Thanks.
David,
It only loads the text for the person who is viewing his own post, not in all posts. Unless you post a mile long novel it will not be noticible in load times or bandwidth. Its just a few lines of text per thread. A small icon would take longer to load and use more bandwidth.

The Keeper
01-17-2004, 03:27 PM
You don't suppose it might be behind these problems, do you?

http://www.vbulletin.com/forum/bugs.php?do=view&bugid=1824

I am pretty certain it's the only change I've made to showthread.

David Bott
01-17-2004, 05:01 PM
Thank you kindly. I do see that now. I was set as a admin thus all the posts had the data.

I think I found another bug though. If it has been noticed already, I am sorry but I did not see it.

Issue...If you are subscribed to a thread it will automaitcally unsubscribe you from that thread if you use QuickEdit.

Please advise.

EvilLS1
01-17-2004, 05:12 PM
David,
You can add the subscibe option by placing this next to your sig checkbox in the showthread_quickedit template:


<input type="checkbox" name="email" value="yes" checked><smallfont>subscribe</smallfont>

EvilLS1
01-17-2004, 05:13 PM
You don't suppose it might be behind these problems, do you?

http://www.vbulletin.com/forum/bugs.php?do=view&bugid=1824

I am pretty certain it's the only change I've made to showthread.
I don't think so. But try removing the hack and see if the problem goes away.

David Bott
01-17-2004, 05:21 PM
That is great...however that just forces the subscribe. Now if they were not and they edit and do not uncheck the box, they are subscribed. I can move it to NO but that gives the reverse issue.

Any way to pull the correct setting?

Thank you.

EvilLS1
01-17-2004, 05:24 PM
That is great...however that just forces the subscribe. Now if they were not and they edit and do not uncheck the box, they are subscribed. I can move it to NO but that gives the reverse issue.

Any way to pull the correct setting?

Thank you.
Try using this hidden input:

<input type="hidden" name="email" value="yes" $emailchecked>

David Bott
01-17-2004, 05:42 PM
Thanks...sounded good but only made a blank space with the subscribe by default being on or off. That $emailchecked does not seem to have been set.

I also have QUICKREPLY installed and that does use a $emailbox for either "yes" or just a blank based on the users settings. It does work for that area of the page, but if I try to use the same $emailbox in QuickEdit it is always a blank. Stange that I can not use the same setting.

David Bott
01-18-2004, 12:51 AM
Hello....If you can find the answer for the above, that would be great for I have to many members now mentioning it.

In case you did not know...AVS Forum and TiVo Community Forum are very active. AVS even at the time of this post has 1245 users on-line. http://www.avsforum.com

Thanks

EvilLS1
01-18-2004, 02:08 AM
David,
I wish I could tell you more, but I honestly don't know. I've never noticed this before because I have notifications turned off on my site. My server is down right now but when its back online I'll try a few things to see if I can make it work. If I figure out something I'll let you know.

Dewayne

David Bott
01-18-2004, 06:49 AM
Please be so kind to look into it, for I would hate to remove this very nice hack.

David Bott
01-18-2004, 03:41 PM
Ok, taking a lead from "Logician" with his UNSUBSCRIBE LINK IF SUBSCRIBED hack...I present the following code for you to look at. More or less it is part of his hack but changed for quickedit. I am thinking it can be put into the /admin/functions.php file right with your hack insert do we get the data needed when the template is called.

The issue however, is when I tried it, it gave me the error....

Fatal error: Call to a member function on a non-object in /home/avsforum/www.avsforum.com/avs-vb/admin/functions.php on line 275


I am thinking it is with the $threadid in the query not being read in and that is something I do not know how to do. Can you help?

Oh...I would use the "$already_subscribed" below (value to be either 'checked' or ' ') to auto check the Subscribe to Thread check box you had made above.


//QuickEdit Check If Subscribed To Thread
$quickedit_userid=$bbuserinfo['userid'];

if ($quickedit_userid!=0)
{
$user_subscribed_already=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$threadid' AND userid='$quickedit_userid' LIMIT 1");
$quickedit_subscribed_id=$user_subscribed_already[subscribethreadid];
if ($quickedit_subscribed_id>0)
{
$already_subscribed='checked';
}
else
{
$already_subscribed='';
}
}
else
{
$already_subscribed='';
}
//QuickEdit Check If Subscribed To Thread


Please help. Thanks

EvilLS1
01-18-2004, 08:46 PM
David,

In admin/functions.php find:

if ($post[username] == $bbuserinfo[username]) {
$edittext = htmlspecialchars($post[pagetext]);

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


Replace it with:

if ($post[username] == $bbuserinfo[username]) {
$edittext = htmlspecialchars($post[pagetext]);
$subuserid=$post[userid];
$pthreadid=$post[threadid];
if ($subuserid!=0) {
$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");
$poop=$subscribed[subscribethreadid];
if ($poop > 0){
$emailchecked="CHECKED";
}else{
$emailchecked="";
}
}

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


The put this line of code in your showthread_quickedit template:

<input type="hidden" name="email" value="yes" $emailchecked>

David Bott
01-18-2004, 09:12 PM
Thanks for the help.

Sorry...Same error as I was getting.

Fatal error: Call to a member function on a non-object

But your code seems much nicer.

EvilLS1
01-18-2004, 09:14 PM
Thanks for the help.

Sorry...Same error as I was getting.

Fatal error: Call to a member function on a non-object

But your code seems much nicer.
Thats odd. I tested it on my own forum and its working perfectly. Perhaps its not compatible with some other hack you've installed?

EvilLS1
01-18-2004, 09:16 PM
You did remove all of the code that you added earlier right? You could try adding this to a fresh (unhacked) functions.php to see if it works.

David Bott
01-18-2004, 09:18 PM
Pondering...Can't see why it would not work, after all, it is just a call to the DB to look up a status and set a value.

Note...I am also using this if it makes a difference...


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

EvilLS1
01-18-2004, 09:19 PM
That shouldn't make any difference.

David Bott
01-18-2004, 09:22 PM
Code is as such...


if (($bbuserinfo[usergroupid] ==5) || ($bbuserinfo[usergroupid] ==6) || ($bbuserinfo[usergroupid] ==7) or ($post[username] == $bbuserinfo[username])) {
$edittext = htmlspecialchars($post[pagetext]);
$subuserid=$post[userid];
$pthreadid=$post[threadid];
if ($subuserid!=0) {
$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");
$poop=$subscribed[subscribethreadid];
if ($poop > 0){
$emailchecked="CHECKED";
}else{
$emailchecked="";
}
}

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


But produces that error like something was not defined.

May I send you my test functions.php file vai e-mail? If so, please be so kind to PM me your address.

EvilLS1
01-18-2004, 09:27 PM
Try it on an unhacked functions.php and see what happens..

Also make sure you have the code placed in the right place (above this):

//highlight words for search engine

I'm using 2.2.8 and its working like a champ for me.

David Bott
01-18-2004, 09:29 PM
If I did that, some other items would surely fail. :) (That being to put in a fresh functions.php)

David Bott
01-18-2004, 09:32 PM
It does not like this line it seems...


$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");


Which is line 274.

EvilLS1
01-18-2004, 09:34 PM
If I did that, some other items would surely fail. :) (That being to put in a fresh functions.php)
I meant temporarily.. Just to see if it works. ;)

EvilLS1
01-18-2004, 09:36 PM
It does not like this line it seems...


$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");


Which is line 274.
Try using this query instead:


$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid='$subuserid' LIMIT 1");

David Bott
01-18-2004, 09:46 PM
Same issue. It is something in the query for if I // that out, no error.

David Bott
01-18-2004, 09:55 PM
Ok, did the fresh functions.php and got the same thing. Even if I made the query something like...

$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='353631' AND userid='1' LIMIT 1");


...with hard coded numbers, I receive the error.

If I test the query in PHPMyAdmin it runs without issue.

So, do I need to do something with $subscribed first to set it to work or something. Weird all the same.

David Bott
01-19-2004, 03:35 PM
It was missing "global $DB_site;" right about the query call. All good now.

EvilLS1
01-19-2004, 03:44 PM
Glad ya got it working.

David Bott
01-19-2004, 03:45 PM
To wrap this up, for those that would like to have the hack 1) So that the QuickEdit shows for Admins, Mods, and Super mods on all posts, and 2) To have it check for the status of the thread to see if it is subscribed to or not...here is the code for the template and the /admin/functions.php to use...

Template code...


<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post" onSubmit="return validate(this)">
<input name="r2" type="radio" value="" onClick="toggleT('e$post[postid]','s')"><smallfont>QuickEdit</smallfont><br>
<div id="e$post[postid]" style="VISIBILITY: hidden; POSITION: absolute">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="updatepost">
<input type="hidden" name="postid" value="$post[postid]">
<input type="hidden" name="parseurl" value="yes">
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="1" bgcolor="{tablebordercolor}" {tableouterextra} width="55" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}"><b>Quick Edit</b></normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}" nowrap><normalfont><b>Subject:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="title" value="$post[title]" size="55" maxlength="85" tabindex="1"></normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}" valign="top" nowrap><normalfont><b>Message:</b></normalfont>
<p>
</td>
<td bgcolor="{secondaltcolor}">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td><textarea name="message" rows="9" cols="80" wrap="virtual" tabindex="2">$edittext</textarea><br>
<normalfont>
<input type="submit" class="bginput" name="submit" accesskey="s" value="Save Changes" tabindex="3">
<input type="reset" class="bginput" value="Reset" tabindex="4">
</normalfont>
<input type="checkbox" name="signature" value="yes" checked><smallfont>Show Signature?</smallfont>
<input type="checkbox" name="email" value="yes" $emailchecked><smallfont>Subscribe to Thread?</smallfont>
<input name="r2" type="radio" checked value="" onClick="toggleT('e$post[postid]','h')"><smallfont>Close</smallfont>

</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<br>
</form>
</div>



/admin/functions.php code to use...


if (($bbuserinfo[usergroupid] ==5) || ($bbuserinfo[usergroupid] ==6) || ($bbuserinfo[usergroupid] ==7) or ($post[username] == $bbuserinfo[username])) {
$edittext = htmlspecialchars($post[pagetext]);
$subuserid=$post[userid];
$pthreadid=$post[threadid];
if ($subuserid!=0) {
global $DB_site;
$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");
$poop=$subscribed[subscribethreadid];
if ($poop > 0){
$emailchecked="CHECKED";
}else{
$emailchecked="";
}
}

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

jaliam
01-30-2004, 05:01 AM
Excellent hack! I'm loving it!