SMF Ads Support Forum

Themes/Language => Theme Support => Topic started by: pdaryani on August 20, 2006, 12:20:18 pm

Title: ad mod for dilmer mc
Post by: pdaryani on August 20, 2006, 12:20:18 pm
its not working with this theme...can some 1 tell me what i need to do to make it work...i love this theme and it would be gr8 if i could have the ad mod working with this...thnx in advance for replying :)
Title: Re: ad mod for dilmer mc
Post by: bigguy on August 20, 2006, 12:54:00 pm
It does work for DilberMC I have it running on this site:

link removed

I have to go through my files and then put the edits on this page.
Title: Re: ad mod for dilmer mc
Post by: bigguy on August 20, 2006, 05:26:35 pm
These edits are for the "Index.template.php" file for DilberMC. It goes like this:

In your Index.template.php file find:

Code: [Select]
<body>';
After that add:

Code: [Select]
//Display ads on the top of the page
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

In the same file find:

Code: [Select]
<td valign="middle" height="30" class="smalltext" style="padding-left:10px; padding-top:0px; padding-bottom:0px;">
<b>', $txt[102], '</b>: ', $context['random_news_line'], '
</td>

After that add:

Code: [Select]
';
//Welcome Ads
$ads = show_welcomeAds();

if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
echo '

Then find:

Quote
               // Show the menu here, according to the menu sub template.

After that add:

Code: [Select]
//Below the menu ads
$ads = show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);
//Tower Right Ads
$ads = show_towerrightAds();
if(!empty($ads))
echo '<table><tr><td width="100%" valign="top">';
unset($ads);

Then find:

Code: [Select]
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
After that add:

Code: [Select]
//Close table for towerright ads
$ads = show_towerrightAds();
if(!empty($ads))
echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>';

unset($ads);
//Close table for towerleft ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
Title: Re: ad mod for dilmer mc
Post by: skip on February 09, 2008, 10:46:54 am
You show the code for index.template.php for DilberMC. Am I correct in stating that for the other two files used by DilberMC theme BoardIndex.template and messageindex.template one simply inserts the code in the places described within the index.xml file of the mod. or do you not need to ammend these two files?