SMF Ads Support Forum

Themes/Language => Theme Support => Topic started by: schmmj on August 06, 2009, 04:01:05 pm

Title: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: schmmj on August 06, 2009, 04:01:05 pm
I want to use with the AS Theme, but I've never used it before and there's no MessageIndex.template.php file in the AS Theme.  Before I go change all the code, does somebody know if this will still work?

Thanks for your help!
Title: Re: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: pmf41 on August 06, 2009, 04:37:03 pm
if the theme doesnt have a file then it uses it from the default theme so all it means is one less file to edit  ;)
Title: Re: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: schmmj on August 06, 2009, 08:31:46 pm
ok, I found that file...  I'm just a newb, sorry...

I edited the files and uploaded them, and am getting this parse error on my index.template.php:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:/Inetpub/virtual/schmmj/WWWROOT/CGI-BIN/smf/Themes/As_theme/index.template.php on line 265

Here is my code:

256: echo '
257: </head>
258: <body>';
259: echo '
260: //Display ads on the top of the page
261:    if (function_exists("show_topofpageAds"))
262:     {
263:       $ads = show_topofpageAds();   
264:       if(!empty($ads))
265:          if($ads['type']==0)
266:             echo $ads['content'];
267:          else
268:             eval($ads['content']);   
269:       unset($ads);

any help would be appreciated!
Title: Re: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: pmf41 on August 07, 2009, 01:25:17 pm
try

echo '
</head>
<body>';

   //Display ads on the top of the page
   if (function_exists("show_topofpageAds"))
   {
      $ads = show_topofpageAds();   
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);   
      unset($ads);
   }

echo '
Title: Re: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: schmmj on August 08, 2009, 11:00:54 am
that worked, thank you!  I no longer get a parse error.  Now I have a new problem however... my statistics show that I am getting hits on my ads, but they don't show up for either admin or guests.  Any suggestions?
Title: Re: Does this work on AS Theme (no MessageIndex.template.php file)?
Post by: pmf41 on August 08, 2009, 11:36:44 am
let me see your display.template