News:

Version 3.5 has been released. Visit https://custom.simplemachines.org/mods/index.php?mod=255 to get the most up to date version.

Main Menu
Coinbase

Edits for ad_mod_rc2_v2 for themes other than default

Started by bigguy, June 20, 2006, 08:26:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bigguy

Set your permissions for each membergroup to see the ads.

Cholo

 Hey bigguy, I'm running the Dilber MC theme and I'm still confused about that </td> that I need to find. Could you help me locate exactly which one I'm looking for? Thanks a bunch.

bigguy

There will only be a few that have the space infront of it. Thats what you have to look for.

Quote</td>

Cholo

 Then do I add code after each one I find with the space in front of it? or just the first? Could you please show me a little more of the code that goes before and after that particular "</td>?
-I just got done editing the boardindex.template.php and I've noticed that I can't find any display.template.php -->Was there one to begin with? or did something happen, bc now I've got "error_log" in bold black there. This has got me worried, I appreciate all your help already. Thanks  :'(

bigguy

#34
Any template files that you dont find in a theme you are trying to modify means that smf is reading from the "Default" theme templates, so there is no reason to edit or try to find files that aren`t there. I will look in my index.template.php and find the position of the code for you. hold on for a minute or 3. :)

bigguy

In the dilberMC theme in the Index.template.php find:

<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 put:

        //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 '

Cholo

Thanks a ton, I'll do that- I've been waiting for you to get on here all day. haha.
Hey, two more questions
-So, I need to edit the display.template.php in the default theme? (I was just wondering about that template bc the Classic Yabbse      theme and the Babylon theme have that template, but I guess Dilber MC does not).
-My ads (on the bottom of the page) are off to the left; of course I'm not done with all the edits yet-Should they center themselves  when I'm done or do I need to do something else? Thanks again!

-oh yeah, and so I shouldn't be scared of the "error_log"?

Cholo

  I put it here-this is what my code looks like now. I saved the changes and I got a parse template error. Or parse code, I forget. haha.



          </td>
         ';
     //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 '



        echo '
            </form>

bigguy

Putting center tags around the ad code should center it. Did you find the code I talked about and place the ad code in the right spot ??? I can`t help but seeing this in your code:

</form>

that is not part of the ad code or the template i don`t think. ( I closed my editor but I didn`t see that anywhere)

Cholo

 Yeah, that part is just the code that follows where I put in the part you told me to.  My forum's not showing up now-parse template error  >:(

bigguy


Cholo

1.  Just like that, and it screwed up my template for some reason  :-\  RebelRose gave me her template and I just overwrote my messed up one with hers and now I'm fine. I am still wanting to finish doing the edits I need for the ad mod, so I guess I'll just try it again.
2. So bigguy, for the ad mod, what I need to do is edit the templates of the Dilber MC theme, right? Except for the files that it doesn't have, like display.template.php -- with that file (for example) I need to edit the default files. correct?

bigguy

When you install a modification through the package manager it modifies the default theme so no you don`t have to touch the default templates unless the mod didn`t install right. All you need to edit is the temlpate files in the DilberMC theme folder.

EDIT: And maybe the Modifications.english.php file

Cholo

 In your instructions for editing modified themes, it calls for editing the "display.template.php" file. My Dilber MC theme doesn't have that file. So does that mean I go look for that file in the default theme and edit it there? or does that mean that I just don't make the edits to display.template.php?

bigguy

Quote from: bigguy on August 12, 2006, 01:58:51 PM
When you install a modification through the package manager it modifies the default theme so no you don`t have to touch the default templates unless the mod didn`t install right. All you need to edit is the temlpate files in the DilberMC theme folder.

EDIT: And maybe the Modifications.english.php file