ডাউনলোড, প্রিভিউয়ার ও ই-মেইল টেমপ্লেট
প্রিভিউ ও "প্যাকেজে ব্যবহার করুন" সহ আটটি ডাউনলোড পেজ টেমপ্লেট, ফাইলের ধরন অনুযায়ী টেমপ্লেটসহ File Previewer-এর পাঁচটি লেআউট, আর ই-মেইল টেমপ্লেট: নিজের বানানো, লাইভ প্রিভিউ, ভেরিয়েবল তালিকা, টেস্ট পাঠানো ও ব্র্যান্ডেড ফ্রেম।
Three things a visitor or member sees are built from templates you can look at, try and swap without touching code: the download page in front of a file, the file page that shows the preview, and the e-mails the site sends. Each has a gallery or a list with a live preview, so you choose by eye. This chapter covers all three; they are three different screens.
| Template | Where you choose it |
|---|---|
| Download page (what comes before the download) | Admin → Configuration → Download Pages |
| File page layout (how the preview and details sit) | Admin → Extensions → File Previewer → Templates |
| E-mail messages and their frame | Admin → Configuration → E-mail & Templates → Templates |
Download page templates
A download page is the step between the file's address and the bytes: the file's details, the countdown, the free-versus-premium choice and the advertisements (Downloads). Which one a visitor gets depends on their account type; Download Pages is where that is set.
The gallery
The Template gallery on the page shows one card for each template, with a picture of it, its name and a line about it. A green badge on the card names the account types that use it now. The eight that ship:
| Template | What it is |
|---|---|
compare_timed | Compare, timed: the free download with a countdown ring beside the premium offer, then the full comparison. |
compare_all | Compare, no wait: the Free and Premium columns side by side with a button under each, no countdown. |
simple_timed | Simple, timed: one centred card with the file, a countdown ring, then the button. |
redirect | A "preparing your download" page with large advert slots that starts the download by itself. |
minimal | A single quiet line: icon, name, size and a button that counts down inside itself. |
split | The file card on the left, the premium offer on the right. |
dark_hero | A dark full-width band with a glowing file icon, the countdown and both buttons. |
steps | A guided free download in three steps: check the file, wait, download. |
Preview and "Use for package"
- Preview (or a click on the picture) opens the template in a window, drawn inside the real site with a made-up file - nothing is read from or written to your database. Open in a new tab shows it full size. The same page is at
/admin/download-page-manage?preview=<name>; you can add&kind=(archive,video,audio,image,documentorcode) to change the sample file,&countdown=to change the seconds and&ads=0to hide the dashed boxes that mark where the adverts will appear. - Use for package + Use gives that account type this template. If the package already has a download page, its first page takes the new template; otherwise a page is made with the package's own countdown. A package that has Instant Downloads on is told it will only see the page once instant downloads are switched off for it.
The table above the gallery lists what is set (User Level / Page, Download Page, File Types), each with Preview, Edit and Remove. For several pages for one type, a countdown of your own or a file-type filter, use Set Download Page To User Type below the gallery (Downloads explains every field).
Making your own
The gallery shows every template file the active theme and the default theme carry in templates/download/. To change one, copy it from themes/boxpuff/templates/download/ into your own theme under the same path and edit the copy. To add one, put a new .php file there with a comment at the top:
/* Template: My page - one line saying what it looks like */
It appears in the gallery and in the template list at once. A picture for its card goes in previews/<name>.png next to it (a PNG of about 480 x 300). Names that start with _ are helpers and are not listed.
File page templates (the File Previewer)
The File Previewer plugin (File Previewer) decides how a file is shown on its public page. Its Templates tab - next to Settings on Admin → Extensions → File Previewer - holds five layouts:
| Template | What it is |
|---|---|
classic | The preview on its own, exactly as the theme has always shown it. The default. |
cinema | A dark full-width stage for the player, the title and details underneath. |
card | The preview in a card with a side panel: size, type, upload date, the download button and share buttons. |
gallery | The picture first on a soft stage with click-to-zoom and a strip of the folder's other pictures. |
document | A tall paged reader for PDF, text and code with page count, line numbers, wrap and copy. |
Each card has Preview (a sample video, picture, track or code file, whichever suits the layout; add &kind=video|audio|image|document|other to the address to try another) and Set active. The active one is used for every file.
Below the gallery, A template per kind of file lets each kind have its own: Video, Audio, Pictures, Documents, text and code and Everything else, each a drop-down of the five templates or Same as active. A common choice is Cinema for video, Document for PDFs and code, and Card for the rest. Press Save. A kind with its own choice always wins over the active template.
The templates are files in plugins/file-previewer/templates/, with the same /* Template: Name - description */ comment and an optional previews/<name>.png. A layout you add under a new name shows up in the gallery; do not edit the shipped ones in place if you want to keep your change through plugin updates.
E-mail templates
Open Admin → Configuration → E-mail & Templates and the Templates tab. (The other tab, Sending, is the PHP mail or SMTP setup and the test e-mail.)
The list
Every message the site sends has a row: its name, a code, whether it is Built-in or Custom, its subject, whether it is Sent and when it was last updated. Edit opens it, Preview shows it exactly as it goes out, Delete appears on custom ones.
Editing one
- Subject, Sent (off means the site never sends this message) and Body (HTML).
- The right-hand side shows a Live preview that redraws as you type and the Words you can use: click a word such as
{name}or{site_name}to put it where the cursor is. The preview fills them with sample values; a word the message does not supply is left out when it is sent. - Save Template keeps the wording. Reset to original puts a built-in message back as shipped. Send a test of this template mails the saved wording, with sample words, to the address you type, through your Sending settings.
Your own templates
Add a template (below the list) takes a Name, a Subject and a Body; leave the body empty for a short greeting to start from. The template gets the code custom_<name> (for example custom_summer_offer) and the page tells you how a plugin or your own code sends it: mail_send_template('custom_summer_offer', ...). Custom templates can be renamed, edited and deleted; built-in ones can be edited and reset but not deleted.
The branded frame
Every e-mail goes out inside one frame: a header bar with the logo, the message in a card, and a footer. The Frame: header and footer of every e-mail card sets it, with a live Preview of the frame beside it:
| Setting | What it does |
|---|---|
email_header_logo - Logo in the header | On: the logo. Off: the site name in bold letters. |
email_logo_url - Logo address for e-mail | Optional. Use a PNG or JPG; Gmail does not show SVG pictures. Empty uses the site's logo for dark backgrounds, since it sits on the coloured bar (the BoxPuff logo goes out as its PNG). |
email_header_color - Header colour | A hex code. Empty uses the brand colour. |
email_footer_color - Footer colour | A hex code. Empty is #f1f5f9; the text turns light on a dark colour. |
email_footer_lines - Footer lines | Address, phone, company number ... one per line. Empty uses the contact form address. |
email_footer_reason - Why they get it | The sentence about why the person got the message. Empty gives "You receive this e-mail because you have an account on {site_name} ..."; {site_name} works inside it. |
| email_template_header - Header HTML (your own) | Your own HTML for the top of every e-mail. |
| email_template_footer - Footer HTML (your own) | Your own HTML for the bottom. |
The two HTML boxes are for sites that want a frame of their own design. Both take the words [[[SITE_NAME]]] (the site name), [[[WEB_ROOT]]] (the site address), [[[LOGO_URL]]] (the full address of the site logo) and [[[DATE_NOW]]] (today's date, 2026-11-02). Save Frame keeps them with the other frame fields, and the Preview of the frame beside the card shows the result with sample words.
They are used only while Use the HTML header/footer below (email_template_enabled, Site Settings → Email Settings, off by default) is on. Then every e-mail is your header, the message body and your footer, in that order, in place of the whole built-in frame - so the header must open the page (<html>, <body>, your logo) and the footer must close it - and the card says so. With the switch off, or with both boxes empty, the built-in frame above is used and the two boxes do nothing.
Tips
- Open each gallery before you decide: the pictures are small and the previews are real.
- Preview with
&ads=0when you want to judge the layout, and without it when you want to see how much room the adverts take. - Keep the e-mail header colour close to the brand colour and the logo readable on it; send yourself a test to a Gmail and an Outlook address before a campaign.
- A custom e-mail template is the easiest way to give a plugin or a script a message with your own wording and the site's frame.