'Paste' Button in Template Editor
This modification is in the archives.
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 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) } } PHP Code:
<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" />
PHP Code:
<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['paste'] . ' " accesskey="v" onclick="PasteClipboard();" tabindex="1" />
Varname: paste Text: Paste Download No files for download. Screenshots
|