News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to make mods work with themes?

Started by A.M.A, April 28, 2005, 07:20:30 PM

Previous topic - Next topic

SN95Forums

I cant figure this out at all, way too confusing for me  :'( can anyone help me out please?!  add me to msn: [email protected]

Thanks

mforum

All this is so confusing to me,, in .mod file i have something like  <file name="$themedir/Post.template.php">   , how can i change it so it`ll make the changes to Post.template.php of classic theme???????   :'(

TuXie


aw06

All of this is extremly confusing to me  :-X

Cant i just rename the default theme folder to something .. then rename my custom theme folder to "default" .. then install the mods ... then rename back the folders ???

I guess that wont work .. no ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

djz

Ok I have a question. SO I've got the Pn-Pn theme on my site. Previously I was using the default one that comes with RC2. I've installed a LOT of mods and it would be pretty tiring to get all of em migrated to my new theme's files. SO could I do this?:
Make pn-pn my default theme and then goto package manager and uninstall the mods, then install them again. ?
Please let me know.
Thanks in advance

mully

im running smf 1.0.7 and helious multi as my theme I cannot for the life of me figure it out anyone willing to do it for me its installed but only works on the default theme.

rokkyu

Quote from: A.M.A on April 28, 2005, 07:20:30 PM
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 .mod

2. 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: MikeMill
Please 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?

In my staff.xml file it says for me to open index.template.php, but I do not see this code in there:

// Show the anchor for the top and for the first message.  If the first message is new, say so.

Any ideas?

thanks

nermeen_elhelw


warmachine

So how does one install a mod to a theme that does not contain the code in the <search for> tag?

I'm trying to install the mouseover preview mod to the other themes of our forum and the BlackDay theme does not have the necessary lines of code in messageindex.template.php. Does this mean the mod cannot be installed in that theme?
SMF Forum Admin/Owner:
W-body.com [nofollow]
TGPforums.com [nofollow]

underdog

Please help me!!!!
I try to work with paidsubs in my template pdx-dk03RC3. I try allready for 4 weeks but I't wont work.
When this is working I can promote my website. Can any one please help me to let paidsub work????? :-[
Blijf proberen en je zult het snappen!

jeremyyeo

I wonder if I can use this howto for tiny portal too. Can I?

smartcard

Very confusing.  Can some one help me to appy the ad_mod_1-0-8_v1-0-2c with "Converted Theme from YaBB SE" or "Classic Theme from YaBB SE" Theme?

Gosu Schwarz

What do I do if a file says to edit a theme file but the theme doesn't have that file?
<file name="$themedir/Display.template.php">
But the theme doesn't contain a Display.template.php file so what do I do?

fwitt

if the theme doesnt have that file it uses the one from the default theme

themes only contain the files that have been changed from the default

so if the mod is available in all themes it normally modifies the default theme on install so any files no in other themes have already been changed in the default or if the mod applies to the theme but not default copy the file from the default theme into your theme then edit it. :)

Gosu Schwarz

So what you are saying is that I only need to edit the files that are contained in  new theme directory? And if it says to edit a file that is not there then I don't have to do anything?

fwitt

as long as the mod is installed in your default theme, yes

nolageek

SO, when it says FILE NOT FOUND when installing the theme....  what should I do?

Honestly, the default theme is WAY too complex, I think, to be a default theme.  It's way too graphic heavy IMHO. 

Does anyone have simpler CSS for the default theme that doesn't use all these fancy graphics and stuff?  It's such a pain in the butt.

Seriall

I want to edit the mod package for visual warning which I was to install on 1.0.8. However it has 5 files with the .mod extension. These are:

VisualWarning_SMF11R3
VisualWarning_SMF10
VisualWarning_SMF11b3
VisualWarning_SMF11R1
VisualWarning_SMF11R2

Which one should I edit?

fwitt

i would say the one ending in 10 as the others match 1.1 releases and have 11 in the name

ProtoMan.EXE

Hi, please help me with this, I tried installing SMF Gallery with VB Green Skin Theme, but I can't make the Gallery button to be shown on the toolbar, please help me with this, tell me what to do. Thanks :)

Advertisement: