Back to vBulletin 3.0 Add-Ons

'Paste' Button in Template Editor
Mod Version: 1.00, by NTLDR

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 9
Released: 05 Apr 2004 Last Update: Never Downloads: 1
Not Supported  

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

Download

No files for download.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024