Support Forum
where am I adding this in the functions file and then I need to show that ad under posts so I can add
if ( $spTopicView->current_Post == 1 ) {
echo show_ad();
}
under spTopicView but now I get an error.
Parse error: syntax error, unexpected T_RETURN in /problem-with-post-edit-buttonome/cpagan/public_html/wp-content/sp-resources/forum-themes/mytheme/templates/spFunctions.php on line 32
Let's start this kinda over again...
In your spFunctions file add your function and the code for adsense.
function show_ad(){
echo '<center><script type="text/javascript"><!--
google_ad_client = "pub-3637000718131176";
/* 728x90, created 6/1/10 */
google_ad_slot = "3102579232";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>';
}Put your adsense code in between the first single quote ' and the last ' one.
Then in your spTopicView.php file add this
if ($spTopicView->currentPost == 1) {
if (function_exists('show_ad')) show_ad();
}Put that below
sp_SectionStart('tagClass=spPostContentSection', 'content');and above
sp_PostIndexContent('', __sp('Awaiting Moderation'));That should do it.
I got to this part but than you lost me on put that below and this above. Below and above what???
if ($spTopicView->currentPost == 1) {
if (function_exists('show_ad')) show_ad();
}put that below?????
sp_SectionStart('tagClass=spPostContentSection', 'content');and above?????
sp_PostIndexContent('', __sp('Awaiting Moderation'));Sorry, In your spTopicView.php file you will see these entries already in it.
sp_SectionStart('tagClass=spPostContentSection', 'content');
sp_PostIndexContent('', __sp('Awaiting Moderation'));Put this
if ($spTopicView->currentPost == 1) {
if (function_exists('show_ad')) show_ad();
}between them.
just change your checks on the current post position...
if ($spTopicView->currentPost == 1 || $spTopicView->currentPost == 3 || $spTopicView->currentPost == 4)
or break it up into separate 'if' statements...
Visit Cruise Talk Central and Mr Papa's World
Support Forum
Offline
Custom Simple Press Themes
All RSS