Hello,
I tried to follow the guide to install the ad mod on a custom theme. Most edits matched up perfectly but several in the index.template.php file do not. I am getting a parse error and this only occurs if this file is uploaded to the server. All the other edited files are uploaded to the server as well and seem to have no effect but I think that is because index.template.php is not working correctly.
I am attaching this file, can someone please edit it or tell me how to do so?
Thank you very much!
Interestingly I found that ads are working even if I don't upload index.template.php. When I uploaded it I was getting parse errors and the forums wouldn't load. Without it, using the default file my site is loading up just fine with some ads. I don't get the ads in all of the locations that the Ad Management configuration panel says that they would be available. But I am getting them on the board index and message index, after the last post and also within posts and after categories. That's good actually as it puts ads pretty much all over my forums.
I am assuming that if someone modified my index.template.php file I would be able to place ads in all the places that the Ad Management configuration panel indicates are possible. So If anyone would be willing to help it would still be greatly appreciated.
Did you read the sticky? (http://www.smfads.com/forums/index.php?topic=1930.0)
Quote from: ccbtimewizA custom theme is any theme you use in replacement of the default theme. Modifications through the Package Manager are installed on the default theme's template files. It is quite difficult for a modification's author as well as a theme creator to make their modifications work with other themes especially if they have several of their own template files. When a template file is not found in a custom non-default theme, the theme will rollback and use the default theme's template. However for the template files that the custom theme does use, you will need to manually install the modification on to template files.
Quote from: ccbtimewiz on August 02, 2009, 02:30:35 PM
Did you read the sticky? (http://www.smfads.com/forums/index.php?topic=1930.0)
Quote from: ccbtimewizA custom theme is any theme you use in replacement of the default theme. Modifications through the Package Manager are installed on the default theme's template files. It is quite difficult for a modification's author as well as a theme creator to make their modifications work with other themes especially if they have several of their own template files. When a template file is not found in a custom non-default theme, the theme will rollback and use the default theme's template. However for the template files that the custom theme does use, you will need to manually install the modification on to template files.
Please help me with the edits I need to do to make the ads mod work on the Red FS theme. All the other files are fine except index.tremplate.php is very different than the default file so I am unsure how to apply the edits.
Thank you.
Can anyone help me with this please?
Could you please attach the file?
this should work
Quote from: pmf41 on August 07, 2009, 02:49:35 PM
this should work
Thank you so much, I tried it but I got this error:
Template Parse Error!
There was a problem loading the /Themes/red_fs/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting ',' or ';'
Also I looked at the manual install instructions for my version which is 1.1.10 and one of the steps is not in the file you edited, this is the one that is missing:
Find: [Select]
</td>
Add After: [Select]
';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$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 '
Quote from: ccbtimewiz on August 07, 2009, 02:28:18 PM
Could you please attach the file?
Sure here it is.
Thanks!
I think I fixed it
Quote from: pmf41 on August 08, 2009, 03:13:30 AM
I think I fixed it
Thank you very much again. Now I am getting this error: "Unable to load the 'main_above' template."
Also I noticed that you did not add in this edit still:
Find: [Select]
</td>
Add After: [Select]
';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$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 '
Is there a reason you are leaving this one out?
yes there is that part is not in the file and its not needed try it now
Quote from: pmf41 on August 08, 2009, 12:28:54 PM
yes there is that part is not in the file and its not needed try it now
Same error message: "Unable to load the 'main_above' template."
ok ill try again
Quote from: pmf41 on August 08, 2009, 01:05:29 PM
how about now
Unfortunately still the same message.
ok its fixed for sure this time
Quote from: pmf41 on August 08, 2009, 01:25:45 PM
ok its fixed for sure this time
Thank you so much, but I'm still getting the same error; "Unable to load the 'main_above' template."
really it worked for me
Quote from: pmf41 on August 08, 2009, 03:48:15 PM
really it worked for me
Yes same error, any ideas? Could it be related to another file that I have edited? Anything I should check?
i just edited the index.template and left all the others the same and it worked
Quote from: pmf41 on August 15, 2009, 01:43:31 PM
i just edited the index.template and left all the others the same and it worked
Thanks for the help but it's not working for me. I am still getting this error: "Unable to load the 'main_above' template."
try uploading it again because it is working on my site and i used the same index.template
Quote from: pmf41 on August 16, 2009, 10:19:48 PM
try uploading it again because it is working on my site and i used the same index.template
I tried again and got the same error. I am stumped, thanks for all your help but something must be different about our installations.
thank you , this rock.
big surprise many people use this theme