News:

Help keep this project going by donating or buying adseller pro

Main Menu
Coinbase

General overiew of manual edits

Started by bigguy, May 25, 2007, 03:19:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bigguy

The first thing you have to remember about manually editing the ad mod is once it is installed through the package manager the only edits that have to be done are the 4 template files in the custom theme you want to use. When the ad mod installs it edits 4 of the default templates, this is why it works on the default theme. The 4 templates it modifies in the default theme are:

index.template.php
MessageIndex.template.php
Display.template.php
BoardIndex.template.php

Some custom theme's will not have all 4 of these files and may only have 1 or 2. Now what you have to do is ftp into your account to your Themes directory of your SMF install and then to your custom theme folder. Find the 4 template files as mentioned above or as many of them as you can and download them to your desktop.

Now you have the files on your desktop ready to be edited. All you need now is a good editor. A lot of ppl use Dreamweaver, which is fine. I personally use Php Designer. Any editor is good as long as it has a search function and it is NOT notepad from Windows. Open your editor and load up one of the template files and search for your first line of code.

Keep in mind that all authors of themes DO NOT USE the same lines of code as the default theme does. This means that while searching for:

<body>';

in the index.template file you might not find it, but you might find this:

<body>

or some variation of that. Sometimes just searching for the word body is good enough. Next you insert your lines of code from the ad management mod and debug it if you can. debugging a file requires php to be installed on your system most of the time so you might not be able to do that part. If you can't then trial and error are your best friends.

Save your file and upload it to your custom theme folder. BUT BEFORE YOU DO. rename the original file so you do NOT overwrite it. This way you will have it there incase you didn't do the edits right the first time and you can get your board back up and running again. Keep doing this until you get the edits right.

One little trick I have learned is if your theme is not that different from the default theme then you might get away with just renaming the 4 template files in your custom theme folder to something other than what they are called originally. Doing this will tell SMF to use the template files from the default theme folder, and the edits there are already done from when you installed the ad mod. ;)

Hope this helps a bit. It's just a general overview of manually editing custom theme files.