Helpful Information
 
 
Category: vBulletin 3.0 Full Releases
'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:


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


Add above:


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:


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


Add after:


<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

Excellent idea. Clicks install. ;)

nice, might save a click or two ;)

This should be in 3.1 by default for sure!

paste button??

/me always uses ctrl+v :D

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

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

Great idea - Installed :)

Satan

Nice job ;)

;)

thanks for this mod, Onkel_Tom clicks install ;)










privacy (GDPR)