Quote:
Originally Posted by Pitman
without having to actually modify the file each time
|

BUT... you do not have to modify the file. You copy out the templates. What is the difference between copying the templates from a text file named
foo.php and a text file named templates.txt?
Here is a look at the smallest template in the file:
PHP Code:
$MyDefaultTemplates['attbro_ERROR'] = '
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $attbro_PHRASES[attachment_browser]</title>
$headinclude
</head>
<body>
$header
$navbar
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
$attbro_error
</table>
<br /><br /><br /><br />
$footer
</body>
</html>
';
Copy the lines of the template (not including the enclosing single quotes of course), modify it as you wish, then install the template
attbro_ERROR.
The functionality I am trying to offer here is to save the effort for those who would choose not to modify the templates, while adding no effort for those who need to modify them.
If I provided a file templates.txt, all I would do is copy them out for you.
I have fun with such discussions Pitman, so do not think for a second I am trying to preach. Anyway, this is all rather academic given the low level of interest in an attachment lister/browser. The number of sites using attachments for pseudo document management, as we do on our site, is obviously very small. Now my users are asking for search capability within the attached files, for .txt, .doc, and .pdf. It never ends...

Cheers.
ps: In the pending version 2, the templates can be copied out of the file without the need to replace the single-quote occurences of \' with ' per the v1 instructions, so it is now a straight copy as it would be from any text file containing templates.