Mods are mostly done to work with the default theme. It is hard for a Mod's author as well as a theme crater to make Mods work with each theme. However you can still apply a Mod to any theme manually using the following steps.
1. unzip the Mod package, and look for a file ending with
.mod2. open the
.mod file with any text editor and search for
<edit file>…
</edit file> , you will find a file name after the tag. What we need here is looking for a template file i.e.
index.template.php, BoardIndex.template.php ..etc.
3. If you locate any template after the
<edit file> tag, you will find the
<search for> …
</search for> tag below it. It will contain a block of code that must be located in the specified template.
4. After the
<search for> tag, you will find one of these:
<add after>…</add after> , which add a block of code after the code found.
<add before>…</add before> , which add a block of code before the code found.
<replace>…</replace> , which replace a block of code with the code found.
For example:
<edit file>
Themes/default/Display.template.php
</edit file>
<search>
// Show the anchor for the top and for the first message. If the first message is new, say so.
</search>
<replace>
global $bar_exps, $bar_posts;
// Show the anchor for the top and for the first message. If the first message is new, say so.
</replace>
And that means, we need to open Display.template.php and look for:
// Show the anchor for the top and for the first message. If the first message is new, say so.
and replace it with:
global $bar_exps, $bar_posts;
// Show the anchor for the top and for the first message. If the first message is new, say so.
Notice by: MikeMillPlease note that not all Mods use the
.mod file but instead use
.xml files.
For the most part they are the same.
Instead of
<edit file>...</edit file> it will be
<file name="...">The second difference is that
<search for> will be
<search position="...">.
Now this is where it can be confusing. If the position="
before" that means what you are searching for will be before what you insert with the
<add> block. If position="
after" that means what you are searching for will be after what you insert with the
<add> block. If position="
replace" that means you will replace what you searched for with what you
<add>. Finally you may see a position="
end". That means what you
<add> should go right before the
?> characters at the end of the file.
Addition:A german translation of this text is here:
Wie wende ich Mods auf Themen (Skins) an?