Hello everyone,
I was hoping that someone would be kind enough to answer a Google AdSense question for me. I'm interested in putting a Half Banner (234x60) underneath the "Key Stats" in the default theme. Any tips on doing this would be appreciated.
Thank you.
~LuckyOne
Please search adsense (http://www.simplemachines.org/community/index.php?action=search2;search=adsense)
I actually tried a few searches in hopes of yielding results for my specific question of placing an ad directly under Key Stats. Nothing was relevant.
~LuckyOne
Index.template.php
// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>
</div>';
echo '
</td>
<tr>
<td colspan="2" align="right">
==> YOUR CODE HERE <==
</td>
</tr>
Let me know how that looks.
Thank you for the reply.
I tried that (I'm 99% sure that I did it correctly), but unfortunately, it didn't work. In fact, I couldn't even get the Google ads to show.
Any further help is appreciated. Thank you.
~LuckyOne
Can you post the script you are using?
Is this what you meant? Thanks for the help.
// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>
</div>';
echo '
</td>
<tr>
<td colspan="2" align="right">
==> My Code <==
</td>
</tr>
</tr>
</table>
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';
// Show the menu here, according to the menu sub template.
template_menu();
-LuckyOne
Okay, try changing this
echo '
</td>
<tr>
<td colspan="2" align="right">
==> My Code <==
</td>
</tr>
</tr>
</table>
to this
echo '
</td>
</tr>
<tr>
<td colspan="2" align="right">
==> My Code <==
</td>
</tr>
</table>
Sorry for that.
Awesome. Thank you! That did it.
I hope you don't mind, but I have one more question. As it stands now, in a vertical line ... my forum has the News Box, Key Stats, and an Ad Sense half banner on the right. This has created a bit of open space between my User Info. box on the left and the Home, Help Search, etc. navigation bar.
Is there a way that I can push the User Info. down some to occupy the open space? Or can I perhaps add a graphic in that space?
Again, I can't thank you enough.
-LuckyOne
Maybe a better way for me to say it ... is that I'd like to align User Info. with Key Stats.
Thank you.
-LuckyOne
Any further help on this? It would be most apprecaited. Thanks again.
-LuckyOne
hmmmm This is for the default Theam, What about "Classic YaBB SE Theme", Please tell me where should i past the code..!!!!!
You need to echo ' ADD STUFF HERE '; the code in the function template_main_above(); section.