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)
-   -   'Paste' Button in Template Editor (https://vborg.vbsupport.ru/showthread.php?t=63452)

NTLDR 04-04-2004 10:00 PM

'Paste' Button in Template Editor
 
I just remembered that there used to be a link here for PHP/Code boxes thats selected the contents and copied them to the clipboard and thought I want that for the template manager, then noticed it was already there ;) Anyway, this adds a paste button next to it so after you've edited the template with your favourite editor you can click paste and it replaces the whole template.

Simple but useful IMO. (Note this only works in IE).

In clientscript/vbulletin_templatemgr.js find:

HTML Code:

// #############################################################################
// function to find text on a page

Add above:

HTML Code:

function PasteClipboard()
{
        var tempval = eval('document.cpform.template')
        tempval.focus();
        tempval.select();
        if (document.all)
        {
                therange = tempval.createTextRange();
                therange.execCommand('Paste');
                setTimeout("window.status=''",1800)
        }
}

In includes/adminfunctions_template.php find:

PHP Code:

<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" /> 

Add after:

PHP Code:

<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['paste'] . ' " accesskey="v" onclick="PasteClipboard();" tabindex="1" /> 

Add one new phrase in the Style Tools group:

Varname: paste
Text: Paste

Boofo 04-04-2004 10:47 PM

Excellent idea. Clicks install. ;)

Vivi Ornitier 04-05-2004 03:01 AM

nice, might save a click or two ;)

gmarik 04-05-2004 03:35 AM

This should be in 3.1 by default for sure!

BarBeQue 04-06-2004 08:36 AM

paste button??

[high]* BarBeQue always uses ctrl+v :D[/high]

NTLDR 04-06-2004 11:50 AM

So did I, but click, ctrl-a, ctrl-v takes alot more time then a signgle click ;)

corsacrazy 04-06-2004 01:16 PM

Quote:

Originally Posted by NTLDR
So did I, but click, ctrl-a, ctrl-v takes alot more time then a signgle click ;)

im kinda in the routine of doint that now it comes naturally if u know wot i mean, may take a while to get used to the simple one clik

Chris M 04-12-2004 05:22 PM

Great idea - Installed :)

Satan

weitalia 07-15-2004 01:30 PM

Nice job ;)

;)

Onkel_Tom 08-19-2004 10:30 PM

thanks for this mod, Onkel_Tom clicks install ;)


All times are GMT. The time now is 08:40 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.01206 seconds
  • Memory Usage 1,736KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete