vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   After posting automatically copy to clipboard (https://vborg.vbsupport.ru/showthread.php?t=66906)

Kentaurus 07-05-2004 10:00 PM

After posting automatically copy to clipboard
 
Oh no! I just finished writting that long long post and the page didn't load.
I wish I would have made a copy in notepad. Too late for that.
I won't write it again.

After hearing that a couple hundred times I wrote this hack. When using Internet Explorer once you submit your post it is copied to the clipboard, meaning that if the page doesn't load then you just press back in your browser, paste, and submit it again. Since most of us users forget to do a backup copy just in case this comes in handy.

(screenshots?) I don't know how I would take screenshots for that.

for IE, only for WYSIWYG

Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.

nexialys 07-06-2004 02:15 PM

hum.. is it only IE that can't keep textarea content in cache ?!

usually, anywhere i go, i can post and press back, the content is again in the field... even if i visited 3 or 4 pages after that, i just go back and the content is there...

Andreas 07-06-2004 02:18 PM

Nice :)
Could you make it so it does also work for the standard editor?

Logikos 07-06-2004 03:45 PM

Quote:

Originally Posted by KirbyDE
Nice :)
Could you make it so it does also work for the standard editor?

He is using the java script code for the WYSIWYG so i don't think this can be done with the standerd one, unless you make it so you have to click something before you send it.

I could be wrong.

Andreas 07-06-2004 04:16 PM

I think I got it working for the standard editor:

In vbulletin_stdedit.js FIND
PHP Code:

function validatePost(tformsubjectValminLengthmaxLength)
{
    return 
validatemessage(tform.message.valuesubjectValminLengthmaxLengthfalsetform);


REPLACE that with
Code:

function validatePost(tform, subjectVal, minLength, maxLength)
{
        postOK = validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform);
        if ((postOK == true) & is_ie) {
          Copied = tform.message.createTextRange();
          Copied.execCommand("Copy");
        }
        return postOK;
}

This might bemoce a very useful feature for poor IE users ;)

weaver 07-06-2004 04:31 PM

Thanks... I have this happen all the time and it's so frustrating. :)

Kentaurus 07-06-2004 04:37 PM

Quote:

Originally Posted by nexialys
hum.. is it only IE that can't keep textarea content in cache ?!

usually, anywhere i go, i can post and press back, the content is again in the field... even if i visited 3 or 4 pages after that, i just go back and the content is there...

It depends a lot on your computer settings, and on the forum not sending the no-cache headers. As for my forums, if you press back then the textarea content is not there anymore. It has become frustrating for some users, even if out of 40 replies only 1 doesn't load.

Logikos 07-06-2004 04:39 PM

Glad to see someone got this for the standard editor.
/me clicks install

Kentaurus 07-06-2004 04:40 PM

Quote:

Originally Posted by KirbyDE
I think I got it working for the standard editor:

In vbulletin_stdedit.js FIND
PHP Code:

function validatePost(tformsubjectValminLengthmaxLength)
{
    return 
validatemessage(tform.message.valuesubjectValminLengthmaxLengthfalsetform);


REPLACE that with
Code:

function validatePost(tform, subjectVal, minLength, maxLength)
{
        postOK = validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform);
        if ((postOK == true) & is_ie) {
          Copied = tform.message.createTextRange();
          Copied.execCommand("Copy");
        }
        return postOK;
}

This might bemoce a very useful feature for poor IE users ;)

Thanks for your code KirbyDE, it seems really useful. Do you mind if I add it to the hack?

I didn't modify the standard editor because the copy function is dhtml only used in wysiwyg. And sometimes users prefer the standard editor because the dhtml breaks their explorer (rare cases).

Andreas 07-06-2004 04:54 PM

Feel free to add it :)

I also prefer the standard-editor, as the WYSIWYG-editor sometimes just does what he wants and not what I want ^.^


All times are GMT. The time now is 05:08 PM.

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.01115 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_php_printable
  • (3)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
  • (10)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