Version: , by Mutt
Developer Last Online: Mar 2013
Version: Unknown
Rating:
Released: 06-27-2001
Last Update: Never
Installs: 1
No support by the author.
Ok don't give me a bunch of crap if I'm posting this wrong, this is my first little contribution to VB.
In the short time I've been playing around with VB, I've already become annoyed at editing templates. I added two little javascript buttons to the page to make things easier.
Copy - click the button to highlight all the text in the textarea and copy it to the clipboard in one step
Preview - opens a new window displaying the html from the message area. It doesn't replace the variables with any value, but does gives you an idea of layout and color changes
for VB v2.0.1
updated attachment below
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
thanks I look forward to installing. the reason i'm being so annoying is because I wasi nstalling hack before and kept fouling up my forum. now I use all 2.0.3 hacks and they seem to work go figure.
1) the instructions, seem to say..."edit templete.php right at the begining of the script just after function displayHTML() "
now, I dont know where the function display HTML went, but its not in any template.php file i have. Could this be clarified>?
2) the only function that is shown somewhere even resembling the beginning, is Start search area, which is a quarter of the way down. I might add, there is nothing said about display HTML there either...just this...
PHP Code:
function confirmaction(theform) {
if ((theform.searchstring.value=="") || (theform.replacestring.value=="")) {
theform.searchstring.select();
return confirm("WARNING:\n\nYou have chosen to perform a FIND/REPLACE operation on all your templates,\nbut at least one of the fields is empty.\n\nAre you SURE?");
} else {
return true;
}
is there something i am missing here?
The instuctions send mixed signals. Is it function display HTML, is it after the function, we add the code, is it after functionhtml we add code?
Is the php file, template.php, which is found in the admin folder??
Either way, im not finding this elusive display HTML code, and it is on 2.03...
one thing i was going to ask about, was the preview feature. will this actually show a HTML preview of the template>?
It looks to me like a very usefull hack. The documentation is a little loose on the edges, but other than that, it sounds like he did one hell of a job on it.
Here is the problem I add that long code, under the error 7,
PHP Code:
{ var inf = document.name.template.value; wintwo = window.open(\", \", 'popup', 'toolbar = no, status = no, scrollbars=yes'); wintwo.document.write(\"\" + inf + \"\"); }
function HighlightAll() { var tempval=eval(\"document.name.template\") tempval.focus() tempval.select() if (document.all){ therange=tempval.createTextRange() therange.execCommand(\"Copy\")
window.status=\"Contents highlighted and copied to clipboard!\" setTimeout(\"window.status=''\",1800) } } var NS4 = (document.layers);
// Which browser? var IE4 = (document.all); var win = window;
// window to search. var n = 0; function findInPage(str) { var txt, i, found; if (str == '') return false; if (NS4)
{
if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; if (n == 0) alert('Not found.'); } if (IE4) { txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart('character', 1); txt.moveEnd('textedit'); }
if (found)
{ txt.moveStart('character', -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } else { if (n > 0) { n = 0; findInPage(str); } else alert('Not found.');
} } return false; } ";
Now i am getting a parse error, on line three, which is the code under the error 7.
I had the same problem the anser is in the error. I think its like template.php and you'll see the rroer infront of <?php or something. I got the same thing I installed the hack by the instructions..goodluck that fix worked for me